diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-11 14:13:43 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-11 14:14:16 -0700 |
| commit | ba2b83d5669f9fcf6f49fcd2adac5997eb07f7d8 (patch) | |
| tree | 55d0ecaafd6c5c871bd987a28a2b61fca16b250c /nomsu.peg | |
| parent | b32634faf8eb0fe1448ca44ddf9b3a6bfaf20b68 (diff) | |
Fixed nomsu codegen for indented text and improved text parsing. Also
moved some more tests inline.
Diffstat (limited to 'nomsu.peg')
| -rw-r--r-- | nomsu.peg | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -101,11 +101,11 @@ inline_text_interpolation: indented_text (Text): '".."' eol %nl {| {~ (%nl*) (%indent -> "") ~} - (indented_plain_text / text_interpolation / {~ ("\" nodent "..") -> "" ~} / {~ %nl+ (%nodent -> "") ~})* + (indented_plain_text / text_interpolation / {~ %nl+ (%nodent -> "") ~})* |} (((!.) %dedent) / (&(%nl %dedent)) / (({} (non_dedent_error -> "Unexpected character while parsing Text") %userdata) => error)) indented_plain_text (Text): - {| ({~ "\\" -> "\" ~} / {[^%nl\]+} / {!(text_interpolation / "\" nodent "..") "\"})+ - {~ (%nl+ (%nodent -> "")) / (("\" nodent "..") -> "") ~}* |} + {| {~ (("\\" -> "\") / (("\" nodent "..") -> "") / (!text_interpolation "\") / [^%nl\]+)+ + (%nl+ (%nodent -> ""))* ~} |} text_interpolation: inline_text_interpolation / ("\" indented_expression nodent "..") |
