equal
deleted
inserted
replaced
35 fun position_of (loc: PolyML.location) = |
35 fun position_of (loc: PolyML.location) = |
36 let |
36 let |
37 val {file = text, startLine = line, startPosition = offset, |
37 val {file = text, startLine = line, startPosition = offset, |
38 endLine = end_line, endPosition = end_offset} = loc; |
38 endLine = end_line, endPosition = end_offset} = loc; |
39 val loc_props = |
39 val loc_props = |
40 (case YXML.parse_body text of |
40 (case YXML.parse text of |
41 [(XML.Elem (e, atts, []))] => if e = Markup.positionN then atts else [] |
41 XML.Elem (e, atts, _) => if e = Markup.positionN then atts else [] |
42 | _ => []); |
42 | XML.Text s => Position.file_name s); |
43 in |
43 in |
44 Position.value Markup.lineN line @ |
44 Position.value Markup.lineN line @ |
45 Position.value Markup.offsetN offset @ |
45 Position.value Markup.offsetN offset @ |
46 Position.value Markup.end_lineN end_line @ |
46 Position.value Markup.end_lineN end_line @ |
47 Position.value Markup.end_offsetN end_offset @ |
47 Position.value Markup.end_offsetN end_offset @ |