sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
114 stars 43 forks source link

Some manifest properties are not parsed correctly #131

Closed alimnios72 closed 5 years ago

alimnios72 commented 5 years ago

While running latest brs with manifest support I've found some properties can't be parsed correctly:

My suggestion is to have a list of ignored properties to fix this.

sjbarag commented 5 years ago

Thanks for the report @alimnios72! I just tried to repro and wasn't able to, interestingly enough.

Here's my setup:

A manifest file

mm_icon_focus_hd=pkg:/images/myIcon.jpg
splash_color=#000000
uri_resolution_autosub=$$RES$$,720p,720p,1080p

A BrightScript file

' in a main.brs
sub main()
    print "Hello!"
end sub

Invocation

$ ls
derp.brs        manifest

$ brs --root . derp.brs
hello!

$ # or drop the '--root .' argument since $PWD is the default

$ brs derp.brs
hello!

Are you specifying manifest in the list of files to execute? Since manifest isn't technically a valid brightscript file, the standard parser will throw lots of errors if it tries to parse it! --root (which I've done a horrible job documenting so far) aims to fix that by looking for ${root}/manifest. No need to add manifest to the list of files 😄

alimnios72 commented 5 years ago

My bad, I was actually adding the manifest to the list of brs files, removing it fixes the issues I was seeing. Thanks for the quick response.