more robust treatment of bootstrap source positions;
authorwenzelm
Thu, 04 Jun 2009 19:15:55 +0200
changeset 31434 1f9b6a5dc8cc
parent 31433 12f5f6af3d2d
child 31435 d24ef3ff34bc
more robust treatment of bootstrap source positions;
src/Pure/ML/ml_compiler_polyml-5.3.ML
--- a/src/Pure/ML/ml_compiler_polyml-5.3.ML	Thu Jun 04 19:15:54 2009 +0200
+++ b/src/Pure/ML/ml_compiler_polyml-5.3.ML	Thu Jun 04 19:15:55 2009 +0200
@@ -37,9 +37,9 @@
     val {file = text, startLine = line, startPosition = offset,
       endLine = end_line, endPosition = end_offset} = loc;
     val loc_props =
-      (case YXML.parse_body text of
-        [(XML.Elem (e, atts, []))] => if e = Markup.positionN then atts else []
-      | _ => []);
+      (case YXML.parse text of
+        XML.Elem (e, atts, _) => if e = Markup.positionN then atts else []
+      | XML.Text s => Position.file_name s);
   in
     Position.value Markup.lineN line @
     Position.value Markup.offsetN offset @