Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/acclexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ lexer grammar acclexer;

@ lexer :: declarations
{ /* private lexer declarations/members section */
int parenthesis_local_count, parenthesis_global_count, bracket_count;
int colon_count;
int parenthesis_local_count = 0;
int parenthesis_global_count = 0;
int bracket_count = 0;
int colon_count = 0;
bool paren_processed = false;
}
// Appears in line with the other class member definitions in the cpp file.
Expand Down Expand Up @@ -195,7 +197,12 @@ CAPTURE
;

COLLAPSE
: 'collapse' -> pushMode (expr_clause)
: 'collapse'
{
// Allow colon-delimited modifiers like collapse(force:2) to stay inside the expression.
colon_count = 1;
}
-> pushMode (expr_clause)
;

PCOPY
Expand Down