Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Allow multiple labels per line #1558

Open
Rangi42 opened this issue Nov 24, 2024 · 1 comment
Open

[Feature request] Allow multiple labels per line #1558

Rangi42 opened this issue Nov 24, 2024 · 1 comment
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented Nov 24, 2024

Based on leaderjord's question on Discord.

Now that Global: and .local labels are both column-independent, it should be possible to unambiguously lex and parse multiple labels per line. This would avoid surprise based on an implementation detail of the parser rules, and would allow use cases like these:

MyColor: MyColour: dw $7fff
ZeroFill:
    xor a
Fill: .loop
    ld [hli], a
    dec c
    jr nz, .loop
    ret
MyData: MyDataRow: my_data_macro "-"
    MyDataRowEnd:
    my_data_macro "A"
    my_data_macro "B"
    my_data_macro "C"
; data size is MyDataRowEnd - MyDataRow
@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM labels Nov 24, 2024
@Rangi42
Copy link
Contributor Author

Rangi42 commented Nov 24, 2024

Or even:

Fill: .loop: ld [hli], a :: dec c :: jr nz, .loop :: ret

:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM
Projects
None yet
Development

No branches or pull requests

1 participant