aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-14 17:12:14 +1300
committerAndrew Chambers <[email protected]>2021-10-14 17:12:14 +1300
commit883e6e5d1b5dc376b4943bba85afaf84f1f877bb (patch)
treea2567e6ce4a487b2f9992e5d8dbbf2e126ad3a79
parent4967589e726a760153bb17ae2136c4fc28554d77 (diff)
Add hash style comments.
-rw-r--r--asm.peg4
1 files changed, 3 insertions, 1 deletions
diff --git a/asm.peg b/asm.peg
index 24d397f..1ba1053 100644
--- a/asm.peg
+++ b/asm.peg
@@ -8,7 +8,9 @@ ws = ([ \t]+ | comment)+
comment = "/*" ( ! "\n" ! "*/" . )* "*/" # No support for multiline comments for now as they break our line numbers.
-eol = ws? "\n"
+eolcomment = '#' (! "\n" .)+
+eol = ws? eolcomment? "\n"
+
stmt =
'.' d:directive eol {$$ = d;}