sjbarag / brs

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

Attribute operator causes syntax error #341

Open TwitchBronBron opened 4 years ago

TwitchBronBron commented 4 years ago

This is valid BrightScript syntax (see this BrightScript documentation page for info):

xml = CreateObject("roXMLElement") 
xml.parse("<?xml version=""1.0"" encoding=""UTF-8""?><person name=""bob"" age=""12""></person>")
print "xml age: "
print xml@age 'notice the @ symbol being used to read the attribute from the xml element

prints out

xml age: 
12

However, the parser produces a syntax error.

(Cross posted from RokuCommunity/BrighterScript#34)

lvcabral commented 4 years ago

I will submit my implementation of roXMLElement soon, but this issue still will be valid.