aboutsummaryrefslogtreecommitdiff
path: root/nomsu.2.peg
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu.2.peg')
-rw-r--r--nomsu.2.peg10
1 files changed, 5 insertions, 5 deletions
diff --git a/nomsu.2.peg b/nomsu.2.peg
index 49d4aaf..f95f36d 100644
--- a/nomsu.2.peg
+++ b/nomsu.2.peg
@@ -12,7 +12,7 @@ file_chunks (FileChunks) <-
shebang? comment? blank_lines?
(top_block (nl_nodent section_division top_block)*)
blank_lines?
- ws* unexpected_chunk?
+ unexpected_indent? unexpected_chunk?
top_block (Block) <-
((blank_lines nodent) / (comment nl_nodent))? statement (nl_nodent statement)*
@@ -35,12 +35,12 @@ eol_comment (Comment) <-
unexpected_code <- ws* _unexpected_code
_unexpected_code (Error) <-
- {:error: {~ [^%nl]+ -> "Couldn't parse this code" ~} :}
+ {:error: {~ [^%nl]+ -> "Couldn't parse this code." ~} :}
unexpected_chunk (Error) <-
- {:error: {~ .+ -> "Couldn't parse this code" ~} :}
+ {:error: {~ .+ -> "Couldn't parse this chunk of code." ~} :}
unexpected_indent (Error) <-
- {:error: {~ (=curr_indent ws+) -> "Messed up indentation" ~} :}
- {:hint: {~ '' -> 'Either make sure this line is aligned with the one above it, or make sure the previous line ends with something that uses indentation, like ":" or "(..)"' ~} :}
+ {:error: {~ (=curr_indent ws+) -> "This indentation is messed up." ~} :}
+ {:hint: {~ '' -> 'This line should either have the same indentation as the line above it, or exactly 4 spaces more.' ~} :}
missing_paren_err (Error) <-
{:error: {~ eol -> 'Line ended without finding a closing )-parenthesis' ~} :}
{:hint: {~ '' -> 'Put a ")" here' ~} :}