Commits

Cliff Biffle committed dbbe8c4

Added CHAR and [CHAR].

Comments (0)

Files changed (1)

 
 2:        XT EXIT
 
+@ : CHAR  ( "c...." -- c )  BL SKIP BL SCAN  0= -13 AND THROW  8@ ;
+def tCHAR, "CHAR"
+          XT BL
+          XT SKIP
+          XT BL
+          XT SCAN   @ Time to factor this out yet?
+
+          XT 0EQ
+          LIT -13
+          XT AND
+          XT THROW
+
+          XT 8AT
+          XT EXIT
+
+@ : [CHAR]  ( C: "c...." -- )  ( -- c)  CHAR LITERAL ;  IMMEDIATE
+def tLBRACKCHARRBRACK, "[CHAR]", inline_operands=16
+          XT CHAR
+          XT LITERAL
+          XT EXIT
+
 @ : S"  COMPILE-ONLY  34 SCAN  POSTPONE (S")  DUP 16, S,  ALIGN ;
 def tSQUOTE, "S\"", inline_operands=16
           XT COMPILEMINUSONLY