HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Friends
v1::parse_location Class Reference

#include <hikogui/parser/parse_location.hpp>

Public Member Functions

constexpr parse_location () noexcept=default
 Construct an empty location object.
 
constexpr parse_location (std::string file, int line=1, int column=1) noexcept
 Construct a location.
 
constexpr parse_location (int line, int column) noexcept
 Construct a location.
 
constexpr bool has_file () const noexcept
 
constexpr std::string file () const noexcept
 
constexpr int line () const noexcept
 
constexpr int column () const noexcept
 
constexpr std::pair< int, int > line_and_column () const noexcept
 
constexpr void set_file (std::string file) noexcept
 
constexpr void set_line (int line) noexcept
 
constexpr void set_column (int column) noexcept
 
constexpr void set_line_and_column (std::pair< int, int > line_and_column) noexcept
 
constexpr void increment_column () noexcept
 
constexpr void tab_column () noexcept
 
constexpr void increment_line () noexcept
 
constexpr parse_locationoperator+= (char c) noexcept
 
constexpr parse_locationoperator+= (std::string const &s) noexcept
 
constexpr parse_locationoperator+= (char const *s) noexcept
 
constexpr parse_locationoperator+= (parse_location const &location) noexcept
 

Friends

std::string to_string (parse_location const &l) noexcept
 
std::ostreamoperator<< (std::ostream &os, parse_location const &l)
 

Detailed Description

Location inside a configuration file.

Constructor & Destructor Documentation

◆ parse_location() [1/3]

constexpr v1::parse_location::parse_location ( )
constexprdefaultnoexcept

Construct an empty location object.

◆ parse_location() [2/3]

constexpr v1::parse_location::parse_location ( std::string file,
int line = 1,
int column = 1 )
inlineconstexprnoexcept

Construct a location.

Parameters
fileA path to the file where the token was found.

◆ parse_location() [3/3]

constexpr v1::parse_location::parse_location ( int line,
int column )
inlineconstexprnoexcept

Construct a location.

Parameters
lineLine number where the token was found.
columnColumn where the token was found.

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