equal
deleted
inserted
replaced
42 val inner_syntax_of: T -> string |
42 val inner_syntax_of: T -> string |
43 val source_position_of: T -> Symbol_Pos.text * Position.T |
43 val source_position_of: T -> Symbol_Pos.text * Position.T |
44 val content_of: T -> string |
44 val content_of: T -> string |
45 val markup: T -> Markup.T * string |
45 val markup: T -> Markup.T * string |
46 val unparse: T -> string |
46 val unparse: T -> string |
|
47 val print: T -> string |
47 val text_of: T -> string * string |
48 val text_of: T -> string * string |
48 val get_files: T -> file Exn.result list |
49 val get_files: T -> file Exn.result list |
49 val put_files: file Exn.result list -> T -> T |
50 val put_files: file Exn.result list -> T -> T |
50 val get_value: T -> value option |
51 val get_value: T -> value option |
51 val map_value: (value -> value) -> T -> T |
52 val map_value: (value -> value) -> T -> T |
261 | Comment => enclose "(*" "*)" x |
262 | Comment => enclose "(*" "*)" x |
262 | Sync => "" |
263 | Sync => "" |
263 | EOF => "" |
264 | EOF => "" |
264 | _ => x); |
265 | _ => x); |
265 |
266 |
|
267 fun print tok = Markup.markup (#1 (markup tok)) (unparse tok); |
|
268 |
266 fun text_of tok = |
269 fun text_of tok = |
267 if is_semicolon tok then ("terminator", "") |
270 if is_semicolon tok then ("terminator", "") |
268 else |
271 else |
269 let |
272 let |
270 val k = str_of_kind (kind_of tok); |
273 val k = str_of_kind (kind_of tok); |