Fix a horrible scoping/associativity bug.

`1 as $x | . | $x` didn't compile, as it was parsed as

    (1 as $x | .) | $x

where `$x` is undefined, rather than as

    1 as $x | (. | $x)
This commit is contained in:
Stephen Dolan committed 2012-12-02 22:22:08 +00:00
1 parent ea9db414ed
commit 63d10433c9
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ struct lexer_param;
/* revolting hack */
%left ';'
%left '|'
%right '|'
%left ','
%right "//"
%nonassoc '=' SETPIPE SETPLUS SETMINUS SETMULT SETDIV SETDEFINEDOR
+4
View File
@@ -146,6 +146,10 @@ null
[6]
[7]
42 as $x | . | . | . + 432 | $x + 1
34324
43
1 as $x | [$x,$x,$x as $x | $x]
null
[1,1,1]