mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Implement [[ fragment literals ]] (#1614)
This feature is referred to as "code/data literals" in ASMotor, and simply as "literals" in some older assemblers like MIDAS for the PDP-10. RGBASM already had the "section fragments" feature for keeping disparate contents together when linked, so these worked naturally as "fragment literals".
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
bool startsIdentifier(int c) {
|
||||
// This returns false for anonymous labels, which internally start with a '!'
|
||||
// This returns false for anonymous labels, which internally start with a '!',
|
||||
// and for section fragment literal labels, which internally start with a '$'.
|
||||
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '.' || c == '_';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user