Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches

A type detailing parser position information. More...

#include <istream.hpp>

Public Types

typedef std::function< std::string(name_t, std::streampos)> getline_proc_impl_t
typedef std::shared_ptr< getline_proc_impl_tgetline_proc_t

Public Member Functions

 line_position_t (name_t file_path, getline_proc_t getline_proc, int line_number=1, std::streampos line_start=0, std::streampos position=-1)
 line_position_t (const char *, int line_number=1)
 line_position_t ()
const char * stream_name () const
std::string file_snippet () const

Public Attributes

int line_number_m
std::streampos line_start_m
std::streampos position_m

Detailed Description

line_position_t is used to remember a position on a particular line of a file.

Definition at line 127 of file istream.hpp.

Member Typedef Documentation

◆ getline_proc_impl_t

typedef std::function<std::string(name_t, std::streampos)> getline_proc_impl_t

Definition at line 129 of file istream.hpp.

◆ getline_proc_t

typedef std::shared_ptr<getline_proc_impl_t> getline_proc_t

Definition at line 130 of file istream.hpp.

Constructor & Destructor Documentation

◆ line_position_t() [1/3]

line_position_t ( adobe::name_t file_path,
getline_proc_t getline_proc,
int line_number = 1,
std::streampos line_start = 0,
std::streampos position = -1 )

line_number starts at 1.

◆ line_position_t() [2/3]

line_position_t ( const char * ,
int line_index = 1 )
explicit

This constructor is used with FILE and LINE; line_index starts at 0

◆ line_position_t() [3/3]

Member Function Documentation

◆ stream_name()

const char * stream_name ( ) const

Definition at line 143 of file istream.hpp.

◆ file_snippet()

std::string file_snippet ( ) const

Definition at line 145 of file istream.hpp.

Member Data Documentation

◆ line_number_m

int line_number_m

type int to match LINE token

Definition at line 149 of file istream.hpp.

◆ line_start_m

std::streampos line_start_m

The stream position for the start of the line

Definition at line 150 of file istream.hpp.

◆ position_m

std::streampos position_m

The stream position for the current character on the current line

Definition at line 151 of file istream.hpp.