Package org.stringtemplate.v4.compiler
Class Compiler
java.lang.Object
org.stringtemplate.v4.compiler.Compiler
A compiler for a single template.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic AtomicIntegerName subtemplates_sub1,_sub2, ...static final Map<String, Interpreter.Option> static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompile full template with unknown formal arguments.compile(String srcName, String name, List<FormalArgument> args, String template, org.antlr.runtime.Token templateToken) Compile full template with respect to a list of formal arguments.static CompiledSTdefineBlankRegion(CompiledST outermostImpl, org.antlr.runtime.Token nameToken) static Stringprotected voidreportMessageAndThrowSTException(org.antlr.runtime.TokenStream tokens, org.antlr.runtime.Token templateToken, org.antlr.runtime.Parser parser, org.antlr.runtime.RecognitionException re)
-
Field Details
-
SUBTEMPLATE_PREFIX
- See Also:
-
TEMPLATE_INITIAL_CODE_SIZE
public static final int TEMPLATE_INITIAL_CODE_SIZE- See Also:
-
supportedOptions
-
NUM_OPTIONS
public static final int NUM_OPTIONS -
defaultOptionValues
-
funcs
-
subtemplateCount
Name subtemplates_sub1,_sub2, ... -
group
-
-
Constructor Details
-
Compiler
public Compiler() -
Compiler
-
-
Method Details
-
compile
-
compile
Compile full template with unknown formal arguments. -
compile
public CompiledST compile(String srcName, String name, List<FormalArgument> args, String template, org.antlr.runtime.Token templateToken) Compile full template with respect to a list of formal arguments. -
defineBlankRegion
public static CompiledST defineBlankRegion(CompiledST outermostImpl, org.antlr.runtime.Token nameToken) -
getNewSubtemplateName
-
reportMessageAndThrowSTException
protected void reportMessageAndThrowSTException(org.antlr.runtime.TokenStream tokens, org.antlr.runtime.Token templateToken, org.antlr.runtime.Parser parser, org.antlr.runtime.RecognitionException re)
-