equal
deleted
inserted
replaced
50 end; |
50 end; |
51 |
51 |
52 fun report_parse_tree redirect depth space parse_tree = |
52 fun report_parse_tree redirect depth space parse_tree = |
53 let |
53 let |
54 val is_visible = |
54 val is_visible = |
55 (case Context.thread_data () of |
55 (case Context.get_generic_context () of |
56 SOME context => Context_Position.is_visible_generic context |
56 SOME context => Context_Position.is_visible_generic context |
57 | NONE => true); |
57 | NONE => true); |
58 fun is_reported pos = is_visible andalso Position.is_reported pos; |
58 fun is_reported pos = is_visible andalso Position.is_reported pos; |
59 |
59 |
60 |
60 |
133 and breakpoints_tree (loc, props) = fold (breakpoints loc) props; |
133 and breakpoints_tree (loc, props) = fold (breakpoints loc) props; |
134 |
134 |
135 val all_breakpoints = rev (breakpoints_tree parse_tree []); |
135 val all_breakpoints = rev (breakpoints_tree parse_tree []); |
136 val _ = Position.reports (map #1 all_breakpoints); |
136 val _ = Position.reports (map #1 all_breakpoints); |
137 val _ = |
137 val _ = |
138 if is_some (Context.thread_data ()) then |
138 if is_some (Context.get_generic_context ()) then |
139 Context.>> (fold (ML_Env.add_breakpoint o #2) all_breakpoints) |
139 Context.>> (fold (ML_Env.add_breakpoint o #2) all_breakpoints) |
140 else (); |
140 else (); |
141 in () end; |
141 in () end; |
142 |
142 |
143 |
143 |
144 (* eval ML source tokens *) |
144 (* eval ML source tokens *) |
145 |
145 |
146 fun eval (flags: flags) pos toks = |
146 fun eval (flags: flags) pos toks = |
147 let |
147 let |
148 val space = ML_Env.make_name_space {SML = #SML_env flags, exchange = #exchange flags}; |
148 val space = ML_Env.make_name_space {SML = #SML_env flags, exchange = #exchange flags}; |
149 val opt_context = Context.thread_data (); |
149 val opt_context = Context.get_generic_context (); |
150 |
150 |
151 |
151 |
152 (* input *) |
152 (* input *) |
153 |
153 |
154 val location_props = op ^ (YXML.output_markup (":", #props (Position.dest pos))); |
154 val location_props = op ^ (YXML.output_markup (":", #props (Position.dest pos))); |