From 01aa199f7acfe9af57c5970793259b36e060fd11 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 15 May 2018 16:36:21 -0700 Subject: Adding support for coroutines, and cleaning up comment syntax. --- nomsu.peg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nomsu.peg') diff --git a/nomsu.peg b/nomsu.peg index 4deb4ef..4ebf6c2 100644 --- a/nomsu.peg +++ b/nomsu.peg @@ -124,12 +124,12 @@ inline_dict_item: dict_key: text_word / inline_expression -block_comment: "#.." [^%nl]* (%nl+ %indent [^%nl]* (%nl+ %nodent [^%nl]*)* %dedent)? -line_comment: "#" [^%nl]* +comment: "#" [^%nl]* (%nl+ %indent [^%nl]* (%nl+ %nodent [^%nl]*)* %dedent)? +eol_comment: "#" [^%nl]* -eol: %ws* line_comment? (!. / &%nl) -ignored_line: (%nodent (block_comment / line_comment)) / (%ws* (!. / &%nl)) -indent: eol (%nl ignored_line)* %nl %indent ((block_comment/line_comment) (%nl ignored_line)* nodent)? +eol: %ws* eol_comment? (!. / &%nl) +ignored_line: (%nodent comment) / (%ws* (!. / &%nl)) +indent: eol (%nl ignored_line)* %nl %indent (comment (%nl ignored_line)* nodent)? nodent: eol (%nl ignored_line)* %nl %nodent dedent: eol (%nl ignored_line)* (((!.) &%dedent) / (&(%nl %dedent))) non_dedent_error: (!dedent .)* eol (%nl ignored_line)* (!. / &%nl) -- cgit v1.2.3