Package org.stringtemplate.v4.compiler
Class FormalArgument
java.lang.Object
org.stringtemplate.v4.compiler.FormalArgument
Represents the name of a formal argument defined in a template:
test(a,b,x=defaultvalue) ::= "<a> <n> <x>"Each template has a set of these formal arguments or sets
CompiledST.hasFormalArgs
to false
(indicating that no
arguments were specified such as when we create a template with
new ST(...)
).
Note: originally, I tracked cardinality as well as the name of an attribute. I'm leaving the code here as I suspect something may come of it later. Currently, though, cardinality is not used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.antlr.runtime.Token
If they specified default valuex=y
, store the token hereint
-
Constructor Summary
ConstructorsConstructorDescriptionFormalArgument
(String name) FormalArgument
(String name, org.antlr.runtime.Token defaultValueToken) -
Method Summary
-
Field Details
-
name
-
index
public int index -
defaultValueToken
public org.antlr.runtime.Token defaultValueTokenIf they specified default valuex=y
, store the token here -
defaultValue
-
compiledDefaultValue
-
-
Constructor Details
-
FormalArgument
-
FormalArgument
-
-
Method Details