equal
deleted
inserted
replaced
165 (* read token -- with optional YXML encoding of position *) |
165 (* read token -- with optional YXML encoding of position *) |
166 |
166 |
167 fun read_token str = |
167 fun read_token str = |
168 let |
168 let |
169 val tree = YXML.parse str handle Fail msg => error msg; |
169 val tree = YXML.parse str handle Fail msg => error msg; |
170 val text = Buffer.empty |> XML.add_content tree |> Buffer.content; |
170 val text = XML.content_of [tree]; |
171 val pos = |
171 val pos = |
172 (case tree of |
172 (case tree of |
173 XML.Elem ((name, props), _) => |
173 XML.Elem ((name, props), _) => |
174 if name = Markup.tokenN then Position.of_properties props |
174 if name = Markup.tokenN then Position.of_properties props |
175 else Position.none |
175 else Position.none |