Open armoha opened 2 days ago
bug: Upgrade("Protoss Ground Weapons")[player] need to add parenthese: (Upgrade("Protoss Ground Weapons"))[player] Is this a problem?Is there a problem with the order of operations?
also: if we have a function func() return a, b bug: func()[0] or func()[1] when I write (func())[0], correct
also: const x = a + b << c; euddraft will calculate a+b first, and then (a+b)<<c when I write a+ (b<<c) , correct It seems that euddraft did not prioritize shift operations over addition and subtraction operations
bug: Upgrade("Protoss Ground Weapons")[player] need to add parenthese: (Upgrade("Protoss Ground Weapons"))[player] Is this a problem?Is there a problem with the order of operations?
There's ambiguous syntax in epScript between return value selection and array literal. See https://github.com/armoha/euddraft/issues/114
also: const x = a + b << c; euddraft will calculate a+b first, and then (a+b)<<c when I write a+ (b<<c) , correct It seems that euddraft did not prioritize shift operations over addition and subtraction operations
It follows the bad tradition of C language. For now, always use parentheses if you think it is confusing. See https://www.foonathan.net/2017/07/operator-precedence/ for details on this topic:
The C programming language - and thus many derived languages - has a great example of “bad precedence” that annoys me anytime I use it. The precedence of the binary bitwise operators (&, |, …) is lower than that of the comparison operators (== or ‘<`).