From 53c735be55aee97716986ed704f1058e43abd7a2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 26 Jan 2018 14:53:02 -0800 Subject: Removed "\.." syntax, and just added support for the literal ".." as long as it's not followed by an indented region. --- nomsu.moon | 2 -- nomsu.peg | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nomsu.moon b/nomsu.moon index 294a86f..6fcfcc7 100755 --- a/nomsu.moon +++ b/nomsu.moon @@ -40,8 +40,6 @@ do -- Do a pass on all actions to enforce parameters-are-nouns heuristic -- Maybe do some sort of lazy definitions of actions that defer until they're used in code -- Remove nomsu:write and nomsu:writeln and just use print() instead. --- Allow ("..") as an expression, which is obviously not an indented text region, instead --- of having a special syntax for "\.." lpeg.setmaxstack 10000 -- whoa {:P,:R,:V,:S,:Cg,:C,:Cp,:B,:Cmt} = lpeg diff --git a/nomsu.peg b/nomsu.peg index 5ba75cd..e7f34a3 100644 --- a/nomsu.peg +++ b/nomsu.peg @@ -36,9 +36,9 @@ functioncall (FunctionCall): word (Word): { %operator / (!number plain_word) } inline_text (Text): - !('".."') + !('".."' %ws* line_comment? %nl (%ws* %nl)* %gt_nodent) '"' {| - ({~ (('\"' -> '"') / ('\\' -> '\') / ('\..' -> '..') / %escaped_char / [^%nl\"])+ ~} + ({~ (('\"' -> '"') / ('\\' -> '\') / %escaped_char / [^%nl\"])+ ~} / text_interpolation)* |} '"' indented_text (Text): -- cgit v1.2.3