string/nat lit stuff
This commit is contained in:
parent
3b9a339e5e
commit
e211887a34
5 changed files with 146 additions and 41 deletions
|
@ -148,15 +148,31 @@ tests = "lexer" :- [
|
|||
],
|
||||
|
||||
"strings" :- [
|
||||
lexes #" "" "# [Str ""],
|
||||
lexes #" "abc" "# [Str "abc"],
|
||||
lexes #" "\"" "# [Str "\""],
|
||||
lexes #" "\\" "# [Str "\\"],
|
||||
lexes #" "\\\"" "# [Str "\\\""],
|
||||
todo "other escapes"
|
||||
lexes #" "" "# [Str ""],
|
||||
lexes #" "abc" "# [Str "abc"],
|
||||
lexes #" "\"" "# [Str "\""],
|
||||
lexes #" "\\" "# [Str "\\"],
|
||||
lexes #" "\\\"" "# [Str "\\\""],
|
||||
lexes #" "\t" "# [Str "\t"],
|
||||
lexes #" "\n" "# [Str "\n"],
|
||||
lexes #" "🐉" "# [Str "🐉"],
|
||||
lexes #" "\x1f409;" "# [Str "🐉"],
|
||||
lexFail #" "\q" "#,
|
||||
lexFail #" "\" "#
|
||||
],
|
||||
|
||||
todo "naturals",
|
||||
"naturals" :- [
|
||||
lexes "0" [Nat 0],
|
||||
lexes "123" [Nat 123],
|
||||
lexes "69_420" [Nat 69420],
|
||||
lexes "0x123" [Nat 0x123],
|
||||
lexes "0xbeef" [Nat 0xbeef],
|
||||
lexes "0xBEEF" [Nat 0xBEEF],
|
||||
lexes "0XBEEF" [Nat 0xBEEF],
|
||||
lexes "0xbaba_baba" [Nat 0xbabababa],
|
||||
lexFail "123abc",
|
||||
lexFail "0x123abcghi"
|
||||
],
|
||||
|
||||
"universes" :- [
|
||||
lexes "Type0" [TYPE 0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue