|
Bash++
Bash++ compiler internal documentation
|
Represents a single point in a source file. More...
#include <ParserPosition.h>
Public Member Functions | |
| ParserPosition (const std::string *f=nullptr, uint32_t l=0, uint32_t c=0) | |
| void | initialize (const std::string *fn=nullptr, uint32_t l=0, uint32_t c=0) |
| void | lines (uint32_t count=1) |
| Increment the line number by count, resetting the column to 0. | |
| void | columns (uint32_t count=1) |
| Increment the column number by count. | |
Public Attributes | |
| const std::string * | filename |
| uint32_t | line = 0 |
| uint32_t | column = 0 |
Represents a single point in a source file.
Copyright (C) 2025 Andrew S. Rightenburg Bash++: Bash with classes
This is roughly an imitation of the default Bison parser position type, except that it uses unsigned integers for line and column numbers (since they'll never be negative) and those numbers are 0-indexed (where, in Bison's default, they are 1-indexed).
|
inlineexplicit |
|
inline |
Increment the column number by count.
| count | The number of columns to advance |
|
inline |
|
inline |
Increment the line number by count, resetting the column to 0.
| count | The number of lines to advance |
| uint32_t ParserPosition::column = 0 |
| const std::string* ParserPosition::filename |
| uint32_t ParserPosition::line = 0 |