From 883e6e5d1b5dc376b4943bba85afaf84f1f877bb Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Thu, 14 Oct 2021 17:12:14 +1300 Subject: Add hash style comments. --- asm.peg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;} -- cgit v1.2.3