more name changing
This commit is contained in:
@@ -493,7 +493,7 @@ class Macros {
|
||||
|
||||
macros["undefreadermacro"] = (wholeExp:ReaderExp, exps:Array<ReaderExp>, k:KissState) -> {
|
||||
wholeExp.checkNumArgs(1, 1, '(undefReaderMacro [optional &start] ["[startingString]" or [startingStrings...]])');
|
||||
// reader macros undeclared in the form (undefreadermacro &start ...) will be removed from the table
|
||||
// reader macros undeclared in the form (undefReaderMacro &start ...) will be removed from the table
|
||||
// for reader macros that must be at the beginning of lines
|
||||
// at the beginning of lines
|
||||
var table = k.readTable;
|
||||
@@ -503,9 +503,9 @@ class Macros {
|
||||
var strings = switch (exps[0].def) {
|
||||
case MetaExp("start", stringsExp):
|
||||
table = k.startOfLineReadTable;
|
||||
stringsThatMatch(stringsExp, "undefreadermacro");
|
||||
stringsThatMatch(stringsExp, "undefReaderMacro");
|
||||
default:
|
||||
stringsThatMatch(exps[0], "undefreadermacro");
|
||||
stringsThatMatch(exps[0], "undefReaderMacro");
|
||||
};
|
||||
for (s in strings) {
|
||||
table.remove(s);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
(load "BootCodeCommon.kiss")
|
||||
|
||||
(defreadermacro "" [stream]
|
||||
(defReaderMacro "" [stream]
|
||||
`(,(ReaderExp.Symbol
|
||||
(begin (stream.dropWhitespace) (nextToken stream)))
|
||||
(,(ReaderExp.Symbol
|
||||
|
@@ -4,7 +4,7 @@
|
||||
(prop &mut forked false)
|
||||
(prop &mut forkedAt -1)
|
||||
|
||||
(defreadermacro ["jmp" "nop"] [stream]
|
||||
(defReaderMacro ["jmp" "nop"] [stream]
|
||||
(let [inst
|
||||
(nextToken stream)
|
||||
instSymbol
|
||||
|
@@ -9,19 +9,19 @@
|
||||
(function fixFacing [f]
|
||||
(Math.floor (% (if (> 0 f) (+ 4 f) f) 4)))
|
||||
|
||||
(classMethod N [num]
|
||||
(method N [num]
|
||||
(set y (+ y num)))
|
||||
(classMethod S [num]
|
||||
(method S [num]
|
||||
(set y (- y num)))
|
||||
(classMethod E [num]
|
||||
(method E [num]
|
||||
(set x (+ x num)))
|
||||
(classMethod W [num]
|
||||
(method W [num]
|
||||
(set x (- x num)))
|
||||
(classMethod R [angle]
|
||||
(method R [angle]
|
||||
(set facing (fixFacing (+ facing (/ angle 90)))))
|
||||
(classMethod L [angle]
|
||||
(method L [angle]
|
||||
(set facing (fixFacing (- facing (/ angle 90)))))
|
||||
(classMethod F [num]
|
||||
(method F [num]
|
||||
(case facing
|
||||
(0 (E num))
|
||||
(1 (S num))
|
||||
@@ -29,7 +29,7 @@
|
||||
(3 (N num))
|
||||
(otherwise (throw (+ "Bad facing" facing)))))
|
||||
|
||||
(defreadermacro "" [stream]
|
||||
(defReaderMacro "" [stream]
|
||||
(stream.dropWhitespace)
|
||||
(if (stream.isEmpty)
|
||||
null
|
||||
|
@@ -45,10 +45,10 @@
|
||||
(for :FerrySquare seat row
|
||||
(if #|seat == fullSeat|# 1 0))))))
|
||||
|
||||
(defreadermacro "L" [stream] `emptySeat)
|
||||
(defreadermacro "#" [stream] `fullSeat)
|
||||
(defreadermacro "." [stream] `floor)
|
||||
(undefreadermacro "...")
|
||||
(defReaderMacro "L" [stream] `emptySeat)
|
||||
(defReaderMacro "#" [stream] `fullSeat)
|
||||
(defReaderMacro "." [stream] `floor)
|
||||
(undefReaderMacro "...")
|
||||
|
||||
(defreadermacro &start "" [stream]
|
||||
(defReaderMacro &start "" [stream]
|
||||
`(state.push ,(ReaderExp.ListExp (readExpArray stream #|"\n"|#))))
|
||||
|
Reference in New Issue
Block a user