-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprint.a68
21 lines (18 loc) · 1.16 KB
/
print.a68
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
THEME theme = nord theme;
PROC print tokens = ([] TOKEN tokens) VOID: (
FOR i FROM 1 TO UPB tokens DO
TOKEN token = tokens[i];
IF kind OF token = assign token THEN print(( assign OF theme, literal OF token, reset cl ))
ELIF kind OF token = comment token THEN print(( comment OF theme, literal OF token, reset cl ))
ELIF kind OF token = string token THEN print(( string OF theme, literal OF token, reset cl ))
ELIF kind OF token = number token THEN print(( number OF theme, literal OF token, reset cl ))
ELIF kind OF token = brackets token THEN print(( brackets OF theme, literal OF token, reset cl ))
ELIF kind OF token = important token THEN print(( important OF theme, literal OF token, reset cl ))
ELIF kind OF token = unknown token THEN print(( unknown OF theme, literal OF token, reset cl ))
ELIF kind OF token = function token THEN print(( function OF theme, literal OF token, reset cl ))
ELIF kind OF token = keyword token THEN print(( keyword OF theme, literal OF token, reset cl ))
ELSE
print(( "Undefined: (", kind OF token, ") ", white cl, literal OF token, reset cl ))
FI
OD
)