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

Parse error on dangling dot operator #86

@cdthompson

Description

@cdthompson

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> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions