Skip to content

Commit

Permalink
Move lever predicates to the right hand side
Browse files Browse the repository at this point in the history
  • Loading branch information
JD557 committed Sep 20, 2018
1 parent c60964c commit 63924cf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/antlr4/liquid/parser/v4/LiquidLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ lexer grammar LiquidLexer;
}

OutStart
: ( {stripSpacesAroundTags && stripSingleLine}? SpaceOrTab* '{{'
| {stripSpacesAroundTags && !stripSingleLine}? WhitespaceChar* '{{'
: ( SpaceOrTab* '{{' {stripSpacesAroundTags && stripSingleLine}?
| WhitespaceChar* '{{' {stripSpacesAroundTags && !stripSingleLine}?
| WhitespaceChar* '{{-'
| '{{'
) -> pushMode(IN_TAG)
;

TagStart
: ( {stripSpacesAroundTags && stripSingleLine}? SpaceOrTab* '{%'
| {stripSpacesAroundTags && !stripSingleLine}? WhitespaceChar* '{%'
: ( SpaceOrTab* '{%' {stripSpacesAroundTags && stripSingleLine}?
| WhitespaceChar* '{%' {stripSpacesAroundTags && !stripSingleLine}?
| WhitespaceChar* '{%-'
| '{%'
) -> pushMode(IN_TAG)
Expand All @@ -49,16 +49,16 @@ mode IN_TAG;
TagStart2 : '{%' -> pushMode(IN_TAG);

OutEnd
: ( {stripSpacesAroundTags && stripSingleLine}? '}}' SpaceOrTab* LineBreak?
| {stripSpacesAroundTags && !stripSingleLine}? '}}' WhitespaceChar*
: ( '}}' SpaceOrTab* LineBreak? {stripSpacesAroundTags && stripSingleLine}?
| '}}' WhitespaceChar* {stripSpacesAroundTags && !stripSingleLine}?
| '-}}' WhitespaceChar*
| '}}'
) -> popMode
;

TagEnd
: ( {stripSpacesAroundTags && stripSingleLine}? '%}' SpaceOrTab* LineBreak?
| {stripSpacesAroundTags && !stripSingleLine}? '%}' WhitespaceChar*
: ( '%}' SpaceOrTab* LineBreak? {stripSpacesAroundTags && stripSingleLine}?
| '%}' WhitespaceChar* {stripSpacesAroundTags && !stripSingleLine}?
| '-%}' WhitespaceChar*
| '%}'
) -> popMode
Expand Down

0 comments on commit 63924cf

Please sign in to comment.