Adam Cameron
now()throw "this should be the exception I see";
Lucee gives Missing [;] or [line feed] after expression on line 2 cos it's not parsing the code properly. I expect what CF does: this should be the exception I see on line 2.
If CF can work out that the statement ends at now(), then Lucee oughta be able to as well, yeah?
NB: sticking a line break in sorted me out, but still thing my laziness ought to be indulged here. Also perhaps points towards a general glitch in the code parser anyhow.zackster
06/27/2023, 1:18 PMzackster
06/27/2023, 1:18 PMAdam Cameron
Adam Cameron
abort [unrelatedexpression] can seem like abort "abort message" (so I need to use a semi colon, eg: ``abort; [unrelatedexpression]``) and stuff like that. Am pretty sure this is different. I am completely fine with being proven wrong though.zackster
06/27/2023, 1:41 PMAdam Cameron
Adam Cameron
zackster
06/27/2023, 1:42 PMzackster
06/27/2023, 1:43 PMzackster
06/27/2023, 1:44 PMalexpixl8
06/27/2023, 1:53 PMAdam Cameron
alexpixl8
06/27/2023, 3:03 PMgavinbaumanis
06/27/2023, 10:35 PMzackster
06/28/2023, 7:19 AMnow() as now();
now it would need to ignore white space and check that the next character isn't a .
https://github.com/zspitzer/Lucee/blob/6.0/core/src/main/java/lucee/transformer/cfml/script/AbstrCFMLScriptTransformer.java#L2254Adam Cameron
someFunction() + somethingElse. That would not serve by being interpreted as someFunction(); + somethingElse.
It looks to me like the code parser has a glitch in that it's trying to treat [expression] [statement] as [expression] [nextOperandOfExpression], but concludes there is a syntax error due to a missing [operator] or something like that. Instead of going "OK well that's clearly not [expression] [nextOperandOfExpression] , I had better read ahead to see if there's a [beginningOfStatement] there instead, in which case I need to infer an end of statement after `[expression]`"
But then again I'm buggered if I know how any of this works.zackster
06/28/2023, 7:35 AMzackster
06/28/2023, 7:36 AMzackster
06/28/2023, 7:39 AMzackster
06/28/2023, 7:41 AMzackster
06/28/2023, 7:43 AM€zac = "tall";
https://trycf.com/gist/40a89f5335073da09ab5d959211860a0/lucee6-beta?theme=monokaizackster
06/28/2023, 7:45 AMAdam Cameron
VARIABLE NAMING RULES
[...]
• A variable name must begin with a letter, underscore, or Unicode currency symbol.
• The initial character can by followed by any number of letters, numbers, underscore characters, and Unicode currency symbols.From https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/using-coldfusion-variables/creating-variables.html First variant I tried failed on Lucee, btw.
௹a = 123
writeOutput(௹a)
https://trycf.com/gist/bef7e66c005b265a935a0ca11f469322/acf2021?theme=monokai
(௹ picked @ random from https://www.compart.com/en/unicode/category/Sc)
There's a chance it could be trycf.com, as the text editor behaves "oddly" around that character. Best check in a reallyreally install.Adam Cameron
zackster
06/28/2023, 2:35 PMAdam Cameron
zackster
06/28/2023, 2:35 PM