equal
deleted
inserted
replaced
152 case None => Command_Span.Malformed_Span |
152 case None => Command_Span.Malformed_Span |
153 case Some(cmd) => |
153 case Some(cmd) => |
154 val name = cmd.source |
154 val name = cmd.source |
155 val offset = |
155 val offset = |
156 (0 /: span.takeWhile(_ != cmd)) { |
156 (0 /: span.takeWhile(_ != cmd)) { |
157 case (i, tok) => i + Symbol.iterator(tok.source).length } |
157 case (i, tok) => i + Symbol.length(tok.source) } |
158 val end_offset = offset + Symbol.iterator(name).length |
158 val end_offset = offset + Symbol.length(name) |
159 val pos = Position.Range(Text.Range(offset, end_offset) + 1) |
159 val pos = Position.Range(Text.Range(offset, end_offset) + 1) |
160 Command_Span.Command_Span(name, pos) |
160 Command_Span.Command_Span(name, pos) |
161 } |
161 } |
162 result += Command_Span.Span(kind, span) |
162 result += Command_Span.Span(kind, span) |
163 } |
163 } |