-
Notifications
You must be signed in to change notification settings - Fork 10
Lack of support for arbitrary lvalues, no foo.bar
or foo[bar]
#26
Comments
Looks like assignment rule is not defined for arrays! Interesting. |
You seemed to have deliberately commented out the test for that: https://github.com/gosukiwi/Blueberry/blob/master/tests/test.js#L151 And if you're going to fix the nesting thing, you should do that by making the rule recursive. |
Well there are several things to fix on the grammar I think, mostly for expressions. If I make chaining work, it will be with recursion 😄 Right now you can do |
One fun thing is that PHP 5 (unlike PHP 7) doesn't have arbitrarily-nestable lvalues or rvalues... so some things that Blueberry supports might not be supported in PHP 5 without adding brackets or temporary variables ^^ |
I worked on this in 2ef5eed RHS values are still limited though, for example, you can't do |
I think PHP 5.6 (or was it 5.4?) fixed that one. |
foo[:bar] = 3
doesn't work, nor doesfoo.bar
. Also, no nesting is possible, sofoo.bar[:bang].boo
doesn't work, which also doesn't work on the right-hand side, too.The text was updated successfully, but these errors were encountered: