public interface ParserPlugin
A simple extension point to allow us to switch between the classic Groovy parser and the new Antlr based parser(s).
| Type Params | Return Type | Name and description |
|---|---|---|
|
public ModuleNode |
buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst)Builds the AST from a previously parsed CST. |
|
public static ModuleNode |
buildAST(CharSequence sourceText, CompilerConfiguration config, GroovyClassLoader loader, ErrorCollector errors)Parses and converts the supplied source text into a module AST. |
|
public Reduction |
parseCST(SourceUnit sourceUnit, Reader reader)Parses source text into a concrete syntax tree. |
Builds the AST from a previously parsed CST.
sourceUnit - the source being compiledclassLoader - the class loader to use during AST creationcst - the parsed CSTParses and converts the supplied source text into a module AST.
sourceText - the source text to compileconfig - the compiler configuration to useloader - the class loader used during compilationerrors - the collector that receives compilation errorsParses source text into a concrete syntax tree.
sourceUnit - the source being parsedreader - the source reader