aboutsummaryrefslogtreecommitdiff
path: root/src/interp/spad-parser.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/spad-parser.boot')
-rw-r--r--src/interp/spad-parser.boot18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 197bd921..edf0cac0 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -47,6 +47,24 @@ import parse
namespace BOOT
--%
+
+addClose(line,ch) ==
+ FETCHCHAR(line,maxIndex line) = char ";" =>
+ ch = char ";" => line
+ line.(maxIndex line) := ch
+ SUFFIX(char ";",line)
+ SUFFIX(ch,line)
+
+escaped?(s,n) ==
+ n > 0 and FETCHCHAR(s,n-1) = char "__"
+
+infixToken? s ==
+ STRING2ID_-N(s,1) in '(_then _else)
+
+atEndOfUnit? x ==
+ not string? x
+
+--%
macro compulsorySyntax s ==
s or SPAD__SYNTAX__ERROR()