Added foreach in grammar.
This commit is contained in:
parent
fbd3f8df2b
commit
2d8030f09f
|
@ -33,6 +33,7 @@ statement
|
|||
| WHILE LP expression RP ( trailer | empty ) # while
|
||||
| DO block WHILE LP expression RP delimiter # do
|
||||
| FOR LP initializer? SEMICOLON expression? SEMICOLON afterthought? RP ( trailer | empty ) # for
|
||||
| FOR LP decltype ID COLON expression RP trailer # each
|
||||
| declaration delimiter # decl
|
||||
| CONTINUE delimiter # continue
|
||||
| BREAK delimiter # break
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -46,6 +46,13 @@ class PainlessParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> implement
|
|||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitFor(PainlessParser.ForContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitEach(PainlessParser.EachContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
|
|
@ -44,6 +44,13 @@ interface PainlessParserVisitor<T> extends ParseTreeVisitor<T> {
|
|||
* @return the visitor result
|
||||
*/
|
||||
T visitFor(PainlessParser.ForContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code each}
|
||||
* labeled alternative in {@link PainlessParser#statement}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitEach(PainlessParser.EachContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code decl}
|
||||
* labeled alternative in {@link PainlessParser#statement}.
|
||||
|
|
Loading…
Reference in New Issue