Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::LexerState Struct Reference

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.
 
PosTablepositions
 
PosTable::Origin origin
 

Member Data Documentation

◆ docCommentDistance

int nix::LexerState::docCommentDistance = std::numeric_limits<int>::max()

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.

◆ lastDocCommentLoc

ParserLocation nix::LexerState::lastDocCommentLoc

The location of the last doc comment.

(stashing fields are not used)


The documentation for this struct was generated from the following file: