mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Print a more user-friendly error message for leftover diff marks (#1089)
This commit is contained in:
@@ -690,17 +690,19 @@ asmfile : lines
|
|||||||
;
|
;
|
||||||
|
|
||||||
lines : %empty
|
lines : %empty
|
||||||
| lines line
|
| lines opt_diff_mark line
|
||||||
;
|
;
|
||||||
|
|
||||||
endofline : T_NEWLINE | T_EOB
|
endofline : T_NEWLINE | T_EOB
|
||||||
;
|
;
|
||||||
|
|
||||||
plain_directive : label
|
opt_diff_mark : %empty // OK
|
||||||
| label cpu_command
|
| T_OP_ADD {
|
||||||
| label macro
|
error("syntax error, unexpected + at the beginning of the line (is it a leftover diff mark?)\n");
|
||||||
| label directive
|
}
|
||||||
| assignment_directive
|
| T_OP_SUB {
|
||||||
|
error("syntax error, unexpected - at the beginning of the line (is it a leftover diff mark?)\n");
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
line : plain_directive endofline
|
line : plain_directive endofline
|
||||||
@@ -786,6 +788,13 @@ else : T_POP_ELSE T_NEWLINE {
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
plain_directive : label
|
||||||
|
| label cpu_command
|
||||||
|
| label macro
|
||||||
|
| label directive
|
||||||
|
| assignment_directive
|
||||||
|
;
|
||||||
|
|
||||||
endc : T_POP_ENDC {
|
endc : T_POP_ENDC {
|
||||||
lexer_DecIFDepth();
|
lexer_DecIFDepth();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user