public class FormalArgument extends Object
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.
Modifier and Type | Field | Description |
---|---|---|
CompiledST |
compiledDefaultValue |
|
Object |
defaultValue |
|
org.antlr.runtime.Token |
defaultValueToken |
If they specified default value
x=y , store the token here |
int |
index |
|
String |
name |
Constructor | Description |
---|---|
FormalArgument(String name) |
|
FormalArgument(String name,
org.antlr.runtime.Token defaultValueToken) |
public String name
public int index
public org.antlr.runtime.Token defaultValueToken
x=y
, store the token herepublic Object defaultValue
public CompiledST compiledDefaultValue
Copyright © 2019. All rights reserved.