Implementing the choice type
Related to this pull request.
PanParser.jjt file, another
OR option was added to
t=<CHOICE> <LPAREN> stringLiteral() (<COMMA> stringLiteral())` e=<RPAREN>
This will specifically match the
AdvancedType, a very simple super class used to define more advanced types.
AdvancedType class inherits from the
BaseType class. This is required because all types are
wrapped in a
FullType and a
FullType contains a
BaseType. Since the actual identifier is
choice, and not a primitive type, we use the identifier to make the difference between a normal
AliasType and a
PanParserAstUtils.astToType(). The validation phase checks if the
value of an element is one of the possible choices.
This type requires that the input arguments are strings, thus no variables referencing strings, since the arguments of a type can’t be executed during the build phase.
- Added a
- Added pan test files to