equal
deleted
inserted
replaced
14 val none: T |
14 val none: T |
15 val line_file: int -> string -> T |
15 val line_file: int -> string -> T |
16 val line: int -> T |
16 val line: int -> T |
17 val file: string -> T |
17 val file: string -> T |
18 val advance: Symbol.symbol -> T -> T |
18 val advance: Symbol.symbol -> T -> T |
|
19 val get_id: T -> string option |
|
20 val put_id: string -> T -> T |
19 val of_properties: Markup.property list -> T |
21 val of_properties: Markup.property list -> T |
20 val properties_of: T -> Markup.property list |
22 val properties_of: T -> Markup.property list |
21 val default_properties: T -> Markup.property list -> Markup.property list |
23 val default_properties: T -> Markup.property list -> Markup.property list |
22 val str_of: T -> string |
24 val str_of: T -> string |
23 val thread_data: unit -> T |
25 val thread_data: unit -> T |
54 then Pos (SOME (m, n + 1), props) else pos |
56 then Pos (SOME (m, n + 1), props) else pos |
55 | advance _ pos = pos; |
57 | advance _ pos = pos; |
56 |
58 |
57 |
59 |
58 (* markup properties *) |
60 (* markup properties *) |
|
61 |
|
62 fun get_id (Pos (_, props)) = AList.lookup (op =) props Markup.idN; |
|
63 fun put_id id (Pos (count, props)) = Pos (count, AList.update (op =) (Markup.idN, id) props); |
59 |
64 |
60 fun get_int props (name: string) = |
65 fun get_int props (name: string) = |
61 (case AList.lookup (op =) props name of |
66 (case AList.lookup (op =) props name of |
62 NONE => NONE |
67 NONE => NONE |
63 | SOME s => Int.fromString s); |
68 | SOME s => Int.fromString s); |