aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-01-26 14:53:02 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-01-26 14:53:30 -0800
commit53c735be55aee97716986ed704f1058e43abd7a2 (patch)
treece13dd536b687cda302a9092edbc2d1eb64e776f
parent0c0fb9838989ce6eff885b12716d3e89ba52f4e6 (diff)
Removed "\.." syntax, and just added support for the literal ".." as
long as it's not followed by an indented region.
-rwxr-xr-xnomsu.moon2
-rw-r--r--nomsu.peg4
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):