#include <dve_source_position.hh>
Public Member Functions | |
dve_source_position_t (const size_int_t fline, const size_int_t fcol, const size_int_t lline, const size_int_t lcol) | |
A constructor. | |
dve_source_position_t () | |
A constructor (initializs all position parameters to zero). | |
size_int_t | get_source_first_col () const |
Returns the first column of the position in a source code. | |
size_int_t | get_source_first_line () const |
Returns the first line of the position in a source code. | |
size_int_t | get_source_last_col () const |
Returns the last column of the position in a source code. | |
size_int_t | get_source_last_line () const |
Returns the last line of the position in a source code. | |
void | get_source_pos (dve_source_position_t &second) |
Sets a position in a source code (copies parameters from the given object). | |
void | get_source_pos (size_int_t &fline, size_int_t &fcol, size_int_t &lline, size_int_t &lcol) const |
Copies the position in a source code to four given parameters. | |
void | set_source_pos (const dve_source_position_t &second) |
Copies te position in a source code to the given object. | |
void | set_source_pos (const size_int_t fline, const size_int_t fcol, const size_int_t lline, const size_int_t lcol) |
Sets a position in a source code given by four given parameters. |
This class represents a position in a source code. Other classes representing various objects in the source code derive from this class to be possible to locate them in the code.
Position in the source code consists of four parameters:
void get_source_pos | ( | size_int_t & | fline, | |
size_int_t & | fcol, | |||
size_int_t & | lline, | |||
size_int_t & | lcol | |||
) | const |
Copies the position in a source code to four given parameters.
fline | = first line of position | |
fcol | = first column of position | |
lline | = last line of position | |
lcol | = last column of position |
void set_source_pos | ( | const size_int_t | fline, | |
const size_int_t | fcol, | |||
const size_int_t | lline, | |||
const size_int_t | lcol | |||
) |
Sets a position in a source code given by four given parameters.
fline | = first line of position | |
fcol | = first column of position | |
lline | = last line of position | |
lcol | = last column of position |
Referenced by dve_expression_t::assign(), and dve_expression_t::swap().