3 module T = Tiger_parser
7 let to_string = function
10 | T.FUNCTION -> "FUNCTION"
25 | T.ASSIGN -> "ASSIGN"
34 | T.DIVIDE -> "DIVIDE"
39 | T.RBRACE -> "RBRACE"
40 | T.LBRACE -> "LBRACE"
41 | T.RBRACK -> "RBRACK"
42 | T.LBRACK -> "LBRACK"
43 | T.RPAREN -> "RPAREN"
44 | T.LPAREN -> "LPAREN"
45 | T.SEMICOLON -> "SEMICOLON"
48 | T.STRING s -> sprintf "STRING (%S)" s
49 | T.INT i -> sprintf "INT (%d)" i
50 | T.ID id -> sprintf "ID (%s)" id