31 lines
1.1 KiB
Scheme
31 lines
1.1 KiB
Scheme
(begin
|
|
(displayln "--- TEST: arcana/parse -----------------------------------------")
|
|
(displayln
|
|
(arcana/parse
|
|
(list
|
|
(cons 'TOKEN_ROUND_OPEN "(")
|
|
(cons 'TOKEN_IDENT "displayln")
|
|
(cons 'TOKEN_ROUND_OPEN "(")
|
|
(cons 'TOKEN_IDENT "+")
|
|
(cons 'TOKEN_NUM "123")
|
|
(cons 'TOKEN_NUM "456")
|
|
(cons 'TOKEN_ROUND_CLOSE ")")
|
|
(cons 'TOKEN_ROUND_CLOSE ")"))))
|
|
(newline)
|
|
(displayln "--- TEST: arcana/tokenize --------------------------------------")
|
|
(displayln (arcana/tokenize "("))
|
|
(displayln (arcana/tokenize "#false"))
|
|
;(displayln (arcana/tokenize "\"\""))
|
|
;(displayln (arcana/tokenize "\"qwe\""))
|
|
(displayln (arcana/tokenize "(displayln (list 1))"))
|
|
(newline)
|
|
(displayln "--- TEST: arcana/typeof ----------------------------------------")
|
|
(displayln (arcana/typeof '()))
|
|
(displayln (arcana/typeof +))
|
|
(displayln (arcana/typeof (cons 123 456)))
|
|
(displayln (arcana/typeof #false))
|
|
;(displayln (arcana/typeof #\n))
|
|
(displayln (arcana/typeof 'foo))
|
|
(displayln (arcana/typeof "foo"))
|
|
(displayln (arcana/typeof 123))
|
|
)
|