Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Parse error on dangling dot operator #86

Open
cdthompson opened this issue May 29, 2018 · 0 comments
Open

Parse error on dangling dot operator #86

cdthompson opened this issue May 29, 2018 · 0 comments
Labels
bug grammar Requires a change in the grammar help wanted

Comments

@cdthompson
Copy link

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> 

@nishtahir nishtahir added bug help wanted good first issue Good issue for first time contributors grammar Requires a change in the grammar labels May 29, 2018
@nishtahir nishtahir removed the good first issue Good issue for first time contributors label Jun 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug grammar Requires a change in the grammar help wanted
Projects
None yet
Development

No branches or pull requests

2 participants