std.d.lexer requirements

Walter Bright newshound2 at digitalmars.com
Fri Aug 3 12:57:25 PDT 2012


On 8/3/2012 4:40 AM, Tobias Pankrath wrote:
> Would this be an argument for putting the computation of source locations (i.e.
> line + offset or similar) into the range / into an template argument / policy,
> so that it's done in the most effective way for the client?
>
> Kate for example has a "range"-type that marks a span in the text buffer. This
> way the lexer can return token with the correct "textrange" attached and you
> don't need to recompute the text ranges from line/col numbers.

Worth thinking about.




More information about the Digitalmars-d mailing list