Files
Sourcery/SourceryRuntime/Sources/Common/AST/Annotations.swift
T
Ruslan Alikhamov cec7895f0a Adjusted file structure to accommodate two generated files (#1299)
* Adjusted file structure to accommodate two generated files

* Adjusted scripting

* Removed Description, Diffable, Equality for now

* Removed Stencil import

* Updated templates

* Updated scripting

* Updated generated coding

* Disable build deletion (temp)

* Updated template

* Updated generated code

* updated generated code

* Updated generated code

* Adjusted scripting

* Updated scripting

* Updated generated code

* Reverted template deletion

* Removed Stencil imports

* Updated generated code

* trigger CI

* Removed description, diffable and equality stencil templates

* Reverted temporary changes

* Commented failing tests

* Skipping JSExport for description & hash

* Updated generated code

* Enabled failing tests

* Adding stencil templates back to test tests

* Reset generated file for linux for test

* Reverted Extensions for testing

* Reverted ParserResultsComposed

* Attempt to fix unit tests

* Attempt to resolve unit test

* Reverted TypeName asSource

* Reverted TypeName revertion

* Reverted revert of ParserResultComposed

* Reverted revert of Extensions

* Reverted revert of Linux.content.generated

* Reverted attempts to fix unit tests

* Fix for the failing codegen tests

* Added clarifying comment

* Removed description, diffable and equality stencil templates

* Updated generated code

* Tinkering with optimization level for speed boost

* Excluded stencil templates for codegen

* Fixed wrong compiler flag

* Removed speed optimization to a separate PR

* Reverted test code
2024-03-13 00:01:29 +04:00

27 lines
704 B
Swift

import Foundation
public typealias Annotations = [String: NSObject]
/// Describes annotated declaration, i.e. type, method, variable, enum case
public protocol Annotated {
/**
All annotations of declaration stored by their name. Value can be `bool`, `String`, float `NSNumber`
or array of those types if you use several annotations with the same name.
**Example:**
```
//sourcery: booleanAnnotation
//sourcery: stringAnnotation = "value"
//sourcery: numericAnnotation = 0.5
[
"booleanAnnotation": true,
"stringAnnotation": "value",
"numericAnnotation": 0.5
]
```
*/
var annotations: Annotations { get }
}