Closed sjbarag closed 3 years ago
Attempting to use the word constructor as an identifier in brs causes parser errors, despite the fact that this is valid in RBI.
constructor
brs
sub main() constructor = function() return { foo: "bar" } end function instance = constructor() print instance.foo ' => "bar" end sub
output:
$ bin/cli.js /tmp/mwe.brs /tmp/derp.brs(2,4-15): Found unexpected token 'constructor' /tmp/derp.brs(6,4-16): Expected 'end sub' to terminate sub block /tmp/derp.brs(8,15-26): Found unexpected token 'constructor' /tmp/derp.brs(10,0-7): Found unexpected token 'end sub' Error occurred parsing
Attempting to use the word
constructor
as an identifier inbrs
causes parser errors, despite the fact that this is valid in RBI.output: