Add support for INTEGER expressions
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<mu>"}}}" { this.begin("INITIAL"); return 'CLOSE'; }
|
||||
<mu>"}}" { this.begin("INITIAL"); return 'CLOSE'; }
|
||||
<mu>'"'("\\"["]|[^"])*'"' { yytext = yytext.substr(1,yyleng-2).replace(/\\"/g,'"'); return 'STRING'; }
|
||||
<mu>[0-9]+/[}\s] { return 'INTEGER' }
|
||||
<mu>[a-zA-Z0-9_$-]+/[=}\s/.] { return 'ID'; }
|
||||
<mu>. { return 'INVALID'; }
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ params
|
||||
param
|
||||
: path { $$ = $1 }
|
||||
| STRING { $$ = new yy.StringNode($1) }
|
||||
| INTEGER { $$ = new yy.IntegerNode($1) }
|
||||
;
|
||||
|
||||
hash
|
||||
@@ -82,6 +83,7 @@ hashSegments
|
||||
hashSegment
|
||||
: ID EQUALS path { $$ = [$1, $3] }
|
||||
| ID EQUALS STRING { $$ = [$1, new yy.StringNode($3)] }
|
||||
| ID EQUALS INTEGER { $$ = [$1, new yy.IntegerNode($3)] }
|
||||
;
|
||||
|
||||
path
|
||||
|
||||
Reference in New Issue
Block a user