mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
hoist exception definitions
This commit is contained in:
parent
a2d0d6ce43
commit
1c637768c0
@ -1,3 +1,7 @@
|
|||||||
|
exception Nothing
|
||||||
|
exception SyntaxError of string
|
||||||
|
exception ReaderError of string
|
||||||
|
|
||||||
structure Ss = Substring
|
structure Ss = Substring
|
||||||
|
|
||||||
datatype token =
|
datatype token =
|
||||||
@ -27,10 +31,6 @@ fun tokenString SPACE = "SPACE"
|
|||||||
| tokenString AT = "AT"
|
| tokenString AT = "AT"
|
||||||
| tokenString (ATOM s) = "ATOM (" ^ s ^ ")"
|
| tokenString (ATOM s) = "ATOM (" ^ s ^ ")"
|
||||||
|
|
||||||
exception Nothing
|
|
||||||
exception SyntaxError of string
|
|
||||||
exception ReaderError of string
|
|
||||||
|
|
||||||
datatype reader = READER of token list
|
datatype reader = READER of token list
|
||||||
|
|
||||||
fun next (READER (x::xs)) = SOME (x, READER xs)
|
fun next (READER (x::xs)) = SOME (x, READER xs)
|
||||||
|
Loading…
Reference in New Issue
Block a user