Review/std.d.lexer
Contents
Description
std.d.lexer is standard module for lexing D code, written by Brian Schott
Related links
Current state
Being polished before putting on vote.
Review 1
Result
There were no critical concerns raised (by review manager opinion) but Brian has decided to address some of smaller ones before putting it on vote.
Description
Probably longest part of discussion was about requiring lookahead in lexer and related complexity/performance implications. Outcome of discussion wasn't really clear.
Other comments/proposals:
- using _ suffix for keywords (listed separately as raised some discussion)
- various other naming issues
- general lack of documentation
- TokenType definition (performance concerns)
- providing some benchmark for comparing with other lexerout of the box
- splitting it and converting into package
- tests need more coverage / comments
- sharing identifier pool between multiple lexers
Changes so far
https://github.com/Hackerpilot/phobos/commit/9bdb7f97bb8021f3b0d0291896b8fe21a6fead23#std/d/lexer.d :
- There are a few more unit tests now
- bitAnd renamed to amp
- slice rename to dotdot
- Much more cross-referencing in the doc comments
- Start line and column can be specified in the lexer config
https://github.com/Hackerpilot/phobos/compare/D-Programming-Language:df38839...master
Clarifications about concerns
TODO: