diff options
author | bd <bdunahu@operationnull.com> | 2025-04-08 01:56:18 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-08 01:56:18 -0400 |
commit | b85c10ba1c53f1b442fea6bde4c2a2f73cfe5d6b (patch) | |
tree | 643d37db692c19d1ef64223eadcac7a28dbbd7db /t | |
parent | 4c76966b49e8559f710013463dac04143c1f4e09 (diff) |
Simplify lexer-error handling, skeletion parsing functions for types
Diffstat (limited to 't')
-rw-r--r-- | t/lex.lisp | 4 | ||||
-rw-r--r-- | t/parse.lisp | 14 |
2 files changed, 12 insertions, 6 deletions
@@ -76,7 +76,7 @@ (handler-case (progn (read-this "0v0" (lex:read-token)) (fail)) - (lex:invalid-immediate-or-keyword ()))) + (lex:lexer-error ()))) ;; do we want a custom error for this too? (test read-token-immediate-radix @@ -97,4 +97,4 @@ (handler-case (progn (read-this "sub0" (lex:read-token)) (fail)) - (lex:invalid-immediate-or-keyword ()))) + (lex:lexer-error ()))) diff --git a/t/parse.lisp b/t/parse.lisp index 2ab3e76..bd1310f 100644 --- a/t/parse.lisp +++ b/t/parse.lisp @@ -11,10 +11,16 @@ (test extract-label-not-a-label-one (let ((lst '("NICE" "TRY"))) - (is (equal lst - (parse:extract-label lst))))) + (is (equal lst + (parse:extract-label lst))))) (test extract-label-not-a-label-two (let ((lst '("LOOP" lex::colon lex::colon))) - (is (equal lst - (parse:extract-label lst))))) + (is (equal lst + (parse:extract-label lst))))) + +(test extract-line-invalid-type + (handler-case + (progn (parse:tokens->ast '(("foo" LEX::DOLLAR))) + (fail)) + (lex:parser-error ()))) |