Open DanielVoogsgerd opened 2 days ago
Good catch again! I'm genuinely impressed by how thorough you're looking at this! :D
Anyway yes this doesn't make sense. I tried to emulate Rust syntax here, so it's definitely with commas. Let me check the whole attribute tree to check if it makes sense with what I'm actually parsing.
OK, right, it was a bit simpler Rust syntax. Only the following is allowed:
#[key = value]
OR
#[name(lit1, lit2, lit3, ...)]
Note the contents of the second variant is only literals, not any expressions. Makes it easier to parse the on-attributes though xD
Change
Literals ::= Literals Literal
to
Literals ::= Literals COMMA Literal
and it's fixed.
The Branescript compiler assumes that attribute lists are comma-separated. However, this is incompatible with the formal definition of the language: