Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::Pos Struct Reference

#include <position.hh>

Classes

struct  Stdin
struct  String
struct  Hidden
struct  LinesIterator

Public Types

typedef std::variant< std::monostate, Stdin, String, CheckedSourcePath, HiddenOrigin

Public Member Functions

 Pos (uint32_t line, uint32_t column, Origin origin)
 Pos (Pos &other)=default
 Pos (const Pos &other)=default
 Pos (Pos &&other)=default
 Pos (const Pos *other)
 operator bool () const
 operator std::shared_ptr< Pos > () const
std::optional< std::string > getSource () const
void print (std::ostream &out, bool showOrigin) const
std::optional< LinesOfCodegetCodeLines () const
bool operator== (const Pos &rhs) const =default
bool operator!= (const Pos &rhs) const =default
bool operator< (const Pos &rhs) const

Public Attributes

uint32_t line = 0
uint32_t column = 0
Origin origin = std::monostate()

Detailed Description

A position and an origin for that position (like a source file).

Member Function Documentation

◆ getSource()

std::optional< std::string > nix::Pos::getSource ( ) const

Return the contents of the source file.


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