src/Pure/General/position.ML
changeset 27749 24f2b57a34ea
parent 27744 d4c5ddf98869
child 27759 ffb1b5f2690f
equal deleted inserted replaced
27748:c421ee0d2350 27749:24f2b57a34ea
    79     val count =
    79     val count =
    80       (case get_int props Markup.lineN of
    80       (case get_int props Markup.lineN of
    81         NONE => NONE
    81         NONE => NONE
    82       | SOME m => SOME (m, the_default 1 (get_int props Markup.columnN)));
    82       | SOME m => SOME (m, the_default 1 (get_int props Markup.columnN)));
    83     fun property name = the_list (find_first (fn (x: string, _) => x = name) props);
    83     fun property name = the_list (find_first (fn (x: string, _) => x = name) props);
    84   in (Pos (count, property Markup.fileN @ property Markup.idN)) end;
    84   in Pos (count, maps property Markup.position_properties') end;
    85 
    85 
    86 fun properties_of (Pos (count, props)) =
    86 fun properties_of (Pos (count, props)) =
    87   (case count of
    87   (case count of
    88     NONE => []
    88     NONE => []
    89   | SOME (m, n) => [(Markup.lineN, string_of_int m), (Markup.columnN, string_of_int n)]) @ props;
    89   | SOME (m, n) => [(Markup.lineN, string_of_int m), (Markup.columnN, string_of_int n)]) @ props;