Closed DavidPH closed 6 years ago
Decided to regard it as an extension syntax, deferring to acc as the authoritative reference for ACS syntax for now. Also extended the identifier-sequence
script type handling to functions, since that is useful for other targets which don't have script calls, but do have script types.
The ACS front currently has a fixed set of keywords it accepts for script types/flags. This creates an extra step to adding ACS script types and makes the feature useless for non-ACS targets.
Replacing
script-type
andscript-flag-sequence
withidentifier-sequence
inscript-declaration
is grammatically unambiguous, so that seems like the best route. This would need to be accompanied by a warning/error in the ZDACS bytecode module for unrecognized script types, however. Also it would require the bytecode module to be case insensitive about type names or for the canonical names to be made lowercase. I am inclined to the latter, but it would break existing C code. (Although, it would produce a compile-time error rather than silently breaking code and would be a minor syntactic fix.)The big question is whether to make this change in the base grammar or the extension grammar. Most likely the former, though, as it would be easy enough to justify acc's stricter requirements as a note.