Files
scheme-fudge/lexer-test.scm

20 lines
484 B
Scheme
Raw Permalink Normal View History

2025-10-30 19:11:31 +01:00
(import (scheme base)
(scheme write)
(lexer))
(define test
(lambda (input want)
(let ((got (tokenize input)))
(unless (equal? got want)
(display "test fail: input = ")
(display input)
(display "; want = ")
(display want)
(display "; got = ")
(display got)
(newline)))))
(test "Struct Enum" '(Struct Enum))
(test "this is identifier" '("this" "is" "identifier"))
(test "+ - = != :=" '(+ - = != :=))