20 lines
		
	
	
		
			484 B
		
	
	
	
		
			Scheme
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			484 B
		
	
	
	
		
			Scheme
		
	
	
	
	
	
|  | (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 "+ - = != :=" '(+ - = != :=)) |