Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::SymbolTable Class Reference

#include <symbol-table.hh>

Public Member Functions

 SymbolTable (const StaticSymbolTable &staticSymtab)
Symbol create (std::string_view s)
Symbol create (const Value &v)
std::vector< SymbolStr > resolve (const std::span< const Symbol > &symbols) const
SymbolStr operator[] (Symbol s) const
size_t size () const noexcept
size_t totalSize () const
template<typename T>
void dump (T callback) const

Detailed Description

Symbol table used by the parser and evaluator to represent and look up identifiers and attributes efficiently.

Member Function Documentation

◆ create() [1/2]

Symbol nix::SymbolTable::create ( const Value & v)
inline

Converts a forced string value without context into a symbol. A string that comes from the symbol table carries the id of its symbol, so it needs no lookup.

◆ create() [2/2]

Symbol nix::SymbolTable::create ( std::string_view s)
inline

Converts a string into a symbol.


The documentation for this class was generated from the following files: