diff options
Diffstat (limited to 'src/pretty_typing.ml')
-rw-r--r-- | src/pretty_typing.ml | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/pretty_typing.ml b/src/pretty_typing.ml index 371b210..709611b 100644 --- a/src/pretty_typing.ml +++ b/src/pretty_typing.ml @@ -9,66 +9,6 @@ open Parser open Typing open Ast -let token_str = function - | CLASS -> "class" - | ELSE -> "else" - | FALSE -> "false" - | FOR -> "for" - | IF -> "if" - | INT -> "int" - | NEW -> "new" - | NULL -> "NULL" - | PUBLIC -> "public" - | RETURN -> "return" - | THIS -> "this" - | TRUE -> "true" - | VIRTUAL -> "virtual" - | VOID -> "void" - | WHILE -> "while" - | IDENT(s) -> "'"^s^"'" - | TIDENT(s) -> "\""^s^"\"" - | ASSIGN -> "=" - | LOR -> "||" - | LAND -> "&&" - | EQ -> "==" - | NE -> "!=" - | LT -> "<" - | LE -> "<=" - | GT -> ">" - | GE -> ">=" - | PLUS -> "+" - | MINUS -> "-" - | TIMES -> "*" - | DIV -> "/" - | MOD -> "%" - | NOT -> "!" - | INCR -> "++" - | DECR -> "--" - | REF -> "&" - (* and also : unary dereference, plus, minus *) - | LPAREN -> "(" - | RPAREN -> ")" - | RARROW -> "->" - | DOT -> "." - (* OTHER SYMBOLZ *) - | SEMICOLON -> ";" - | DOUBLECOLON -> "::" - | LFLOW -> "<<" - | LBRACE -> "{" - | RBRACE -> "}" - | COMMA -> "," - | COLON -> ":" - (* DATAZ *) - | INTVAL(i) -> "#" ^ (string_of_int i) - | STRVAL(s) -> "`" ^ s ^ "`" - (* STUPIDITIEZS *) - | STD_COUT -> "std::cout" - | INCLUDE_IOSTREAM -> "#include <iostream>" - | EOF -> "end." - -let print_tok t = - print_string ((token_str t) ^ "\n") - let csl f l = List.fold_left (fun x t -> (if x = "" then "" else x ^ ", ") ^ (f t)) "" l |