Closed theCapypara closed 1 month ago
Allow @ as a prefix for label definitions instead of just §. Deprecate the old syntax.
@
§
QWERTY keyboards have no @.
def 0 { @label1; jump @label1; }
This would now be a valid label definition and jump to it.
def 0 { §label1; jump @label1; }
Equivalent definition and jump with current syntax.
The parser must accept AT as an alternative to PARAGRAPH for label.
AT
PARAGRAPH
label
None. Labels would have the same name, regardless of prefix (@label1 and §label1 are the same label), this would be purely on parser level.
@label1
§label1
None.
Decompile labels with the new syntax.
Update this in the documentation. Add a note that "§" is also allowed historically but deprecated.
The old syntax still works, but is now deprecated.
Summary
Allow
@
as a prefix for label definitions instead of just§
. Deprecate the old syntax.Motivation
QWERTY keyboards have no
@
.Examples
This would now be a valid label definition and jump to it.
Equivalent definition and jump with current syntax.
Language Changes
Parser and Lexer Changes
The parser must accept
AT
as an alternative toPARAGRAPH
forlabel
.Behaviour
None. Labels would have the same name, regardless of prefix (
@label1
and§label1
are the same label), this would be purely on parser level.Compiler Implementation
Compiler Interface Changes
None.
Decompiler Changes
Decompile labels with the new syntax.
How to teach
Update this in the documentation. Add a note that "§" is also allowed historically but deprecated.
Alternatives
Backwards compatibility
The old syntax still works, but is now deprecated.