diff options
Diffstat (limited to 'nomsu.4.peg')
| -rw-r--r-- | nomsu.4.peg | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nomsu.4.peg b/nomsu.4.peg index cb2a561..cc1c140 100644 --- a/nomsu.4.peg +++ b/nomsu.4.peg @@ -14,7 +14,7 @@ file_chunks (FileChunks) <- {:shebang: shebang :}? (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)* @@ -37,12 +37,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' ~} :} |
