aboutsummaryrefslogtreecommitdiff
path: root/nomsu.peg
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu.peg')
-rw-r--r--nomsu.peg4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu.peg b/nomsu.peg
index 15d0444..13caa63 100644
--- a/nomsu.peg
+++ b/nomsu.peg
@@ -149,8 +149,8 @@ inline_dict_entry(DictEntry):
dict_key:
text_word / inline_expression
-comment: "#" [^%nl]* (%nl+ %indent [^%nl]* (%nl+ %nodent [^%nl]*)* %dedent)?
-eol_comment: "#" [^%nl]*
+comment: ("#" {} {~[^%nl]* (%nl+ (%indent -> '') [^%nl]* (%nl+ (%nodent -> '') [^%nl]*)* %dedent)?~} %userdata) => Comment
+eol_comment: ("#" {} {[^%nl]*} %userdata) => Comment
eol: %ws* eol_comment? (!. / &%nl)
ignored_line: (%nodent comment) / (%ws* (!. / &%nl))