markers: support new ident '|'
This commit is contained in:
parent
feaae2fb35
commit
16d317fed7
1
AUTHORS
1
AUTHORS
|
@ -156,6 +156,7 @@ Florian Bruhin
|
||||||
Florian Dahlitz
|
Florian Dahlitz
|
||||||
Floris Bruynooghe
|
Floris Bruynooghe
|
||||||
Fraser Stark
|
Fraser Stark
|
||||||
|
Fu Hanxi
|
||||||
Gabriel Landau
|
Gabriel Landau
|
||||||
Gabriel Reis
|
Gabriel Reis
|
||||||
Garvit Shubham
|
Garvit Shubham
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Supported vertical bar ``|`` inside a marker.
|
|
@ -6,7 +6,7 @@ expression: expr? EOF
|
||||||
expr: and_expr ('or' and_expr)*
|
expr: and_expr ('or' and_expr)*
|
||||||
and_expr: not_expr ('and' not_expr)*
|
and_expr: not_expr ('and' not_expr)*
|
||||||
not_expr: 'not' not_expr | '(' expr ')' | ident
|
not_expr: 'not' not_expr | '(' expr ')' | ident
|
||||||
ident: (\w|:|\+|-|\.|\[|\]|\\|/)+
|
ident: (\w|:|\+|-|\.|\[|\]|\\|/|\|)+
|
||||||
|
|
||||||
The semantics are:
|
The semantics are:
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ class Scanner:
|
||||||
yield Token(TokenType.RPAREN, ")", pos)
|
yield Token(TokenType.RPAREN, ")", pos)
|
||||||
pos += 1
|
pos += 1
|
||||||
else:
|
else:
|
||||||
match = re.match(r"(:?\w|:|\+|-|\.|\[|\]|\\|/)+", input[pos:])
|
match = re.match(r"(:?\w|:|\+|-|\.|\[|\]|\\|/|\|)+", input[pos:])
|
||||||
if match:
|
if match:
|
||||||
value = match.group(0)
|
value = match.group(0)
|
||||||
if value == "or":
|
if value == "or":
|
||||||
|
|
Loading…
Reference in New Issue