![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <position.hh>
Classes | |
| struct | Stdin |
| struct | String |
| struct | LinesIterator |
Public Types | |
| typedef std::variant< std::monostate, Stdin, String, SourcePath > | Origin |
Public Member Functions | |
| Pos (uint32_t line, uint32_t column, Origin origin) | |
| operator bool () const | |
| operator std::shared_ptr< const Pos > () const | |
| std::optional< std::string > | getSource () const |
| void | print (std::ostream &out, bool showOrigin) const |
| std::optional< LinesOfCode > | getCodeLines () const |
| bool | operator== (const Pos &rhs) const =default |
| auto | operator<=> (const Pos &rhs) const =default |
| std::optional< std::string > | getSnippetUpTo (const Pos &end) const |
| std::optional< SourcePath > | getSourcePath () const |
Public Attributes | |
| uint32_t | line = 0 |
| uint32_t | column = 0 |
| Origin | origin = std::monostate() |
A position and an origin for that position (like a source file).
| std::optional< std::string > nix::Pos::getSource | ( | ) | const |
Return the contents of the source file.
| std::optional< SourcePath > nix::Pos::getSourcePath | ( | ) | const |
Get the SourcePath, if the source was loaded from a file.