wist
wist copied to clipboard
Parse error on dangling dot operator
Dangling dot operators are valid syntax and the roku interpreter ends up ignoring the final dot. I dislike the language behavior here but it does run as valid syntax. Would be nice to have wist successfully parse this but also have a rule to warn against it since it almost surely was not intended by the developer.
Example behavior from the console
Brightscript Debugger> print m
<Component: roAssociativeArray> =
{
}
Brightscript Debugger> m.foo. = "hi"
Brightscript Debugger> print m
<Component: roAssociativeArray> =
{
foo: "hi"
}
Brightscript Debugger> m.bar = "bye"
Brightscript Debugger> a = m.bar.
Brightscript Debugger> print a
bye
Brightscript Debugger>