Public Member Functions | |
PosIdx | at (const ParserLocation &loc) |
Public Attributes | |
int | docCommentDistance = std::numeric_limits<int>::max() |
ParserLocation | lastDocCommentLoc |
std::unordered_map< PosIdx, DocComment > & | positionToDocComment |
Maps some positions to a DocComment, where the comment is relevant to the location. | |
PosTable & | positions |
PosTable::Origin | origin |
Tracks the distance to the last doc comment, in terms of lexer tokens.
The lexer sets this to 0 when reading a doc comment, and increments it for every matched rule; see lexer-helpers.cc
. Whitespace and comment rules decrement the distance, so that they result in a net 0 change in distance.
ParserLocation nix::LexerState::lastDocCommentLoc |
The location of the last doc comment.
(stashing fields are not used)