From 5c9674880206f66c109adc1bedf8f786166f125f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 15 Jan 2019 17:48:14 -0800 Subject: Fix for formatting indented code with the format tool. --- nomsu.6.peg | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nomsu.6.peg') diff --git a/nomsu.6.peg b/nomsu.6.peg index 9a9393f..39b0629 100644 --- a/nomsu.6.peg +++ b/nomsu.6.peg @@ -1,20 +1,19 @@ --- Nomsu version 5 +-- Nomsu version 6 file <- {:curr_indent: ' '* :} (((methodchain / action / expression / inline_block) eol !.) / file_chunks / comment? blank_lines?) {:curr_indent: %nil :} + (unexpected_code .+)? !. shebang <- "#!" (!"nomsu" [^%nl])* "nomsu" ws+ "-V" ws* [0-9.]+ [^%nl]* (%nl / !.) file_chunks (FileChunks) <- - {:curr_indent: ' '* :} {:shebang: shebang :}? (top_block (nl_nodent section_division top_block)*) blank_lines? ws* unexpected_chunk? - {:curr_indent: %nil :} section_division <- ("~")^+3 eol @@ -32,9 +31,7 @@ comment (Comment) <- top_block (Block) <- - {:curr_indent: ' '* :} comment? blank_lines? statement (nl_nodent statement)* - {:curr_indent: %nil :} inline_block (Block) <- ":" ws* (inline_statement (ws* ";" ws* inline_statement)*)? -- cgit v1.2.3