Exposes the SyntaxAnnotations used by Metalama.
Namespace: Metalama.Framework.Engine.Formatting
Assembly: Metalama.Framework.Sdk.dll
Syntax
public static class FormattingAnnotations
Properties
Name | Description |
---|---|
PossibleRedundantAnnotation | Annotation used to mark locals and 'return;' statement that may be redundant. Currently we are not doing anything with them, but we could. |
SourceCodeAnnotation | Gets an annotation that means that the syntax stems from source code. This can be added to a child node of a node annotated
with the |
Methods
Name | Description |
---|---|
WithFormattingAnnotationsFrom<T>(T, SyntaxNode) | |
WithGeneratedCodeAnnotation(SyntaxToken, SyntaxAnnotation) | Annotates a syntax node with an annotation meaning that the syntax node and all its children are generated. The annotation is typically obtained from GeneratedCodeAnnotation, but it can also be created from CreateGeneratedCodeAnnotation(string). |
WithGeneratedCodeAnnotation(in SyntaxTrivia, SyntaxAnnotation) | |
WithGeneratedCodeAnnotation<T>(T?, SyntaxAnnotation) | Annotates a syntax node with an annotation meaning that the syntax node and all its children are generated, except whose marked with WithSourceCodeAnnotation<T>(T?). The annotation is typically obtained from GeneratedCodeAnnotation, but it can also be created from CreateGeneratedCodeAnnotation(string). |
WithSimplifierAnnotation<T>(T) | |
WithSourceCodeAnnotationIfNotGenerated<T>(T) | |
WithSourceCodeAnnotation<T>(T?) | Annotates a syntax node with an annotation meaning that the syntax node and all its children are user code. The annotation is typically obtained from GeneratedCodeAnnotation, but it can also be created from CreateGeneratedCodeAnnotation(string). |