Package-level declarations
Types
Link copied to clipboard
open class ParseTreeToASTTransformer(issues: MutableList<Issue> = mutableListOf(), allowGenericNode: Boolean = true, val source: Source? = null) : ASTTransformer
Implements a transformation from an ANTLR parse tree (the output of the parser) to an AST (a higher-level representation of the source code).
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
inline fun <S : RuleContext, T : Node> ParseTreeToASTTransformer.registerTrivialPTtoASTConversion(vararg nameConversions: Pair<KCallable<*>, KCallable<*>>)
inline fun <S : RuleContext, T : Node> ASTTransformer.registerTrivialPTtoASTConversion(vararg nameConversions: Pair<String, String>)
Link copied to clipboard
Link copied to clipboard
Translate the given node and ensure a certain type will be obtained.
Link copied to clipboard
fun <T> ParseTreeToASTTransformer.translateList(original: Collection<out ParserRuleContext>?): ObservableList<T>
Translate a whole collection into a mutable list, translating each element and ensuring the list has the expected type.
Link copied to clipboard
Translate the only child (of type ParseRuleContext) and ensure the resulting value as the expected type.
Link copied to clipboard
Translate the given node and ensure a certain type will be obtained, if the value is not null. If the value is null, null is returned.