libqasm
library for handling cQASM files
|
Source location annotation object, containing source file line numbers etc. More...
Public Member Functions | |
SourceLocation (const std::string &filename, uint32_t first_line=0, uint32_t first_column=0, uint32_t last_line=0, uint32_t last_column=0) | |
Constructs a source location object. More... | |
void | expand_to_include (uint32_t line, uint32_t column=1) |
Expands the location range to contain the given location in the source file. More... | |
Public Attributes | |
std::string | filename |
The name of the source file. More... | |
uint32_t | first_line |
The first line of the range, or 0 if unknown. More... | |
uint32_t | first_column |
The first column of the range, or 0 if unknown. More... | |
uint32_t | last_line |
The last line of the range, or 0 if unknown. More... | |
uint32_t | last_column |
The last column of the range, or 0 if unknown. More... | |
Source location annotation object, containing source file line numbers etc.
Definition at line 19 of file cqasm-annotations.hpp.
#include <cqasm-annotations.hpp>
cqasm::annotations::SourceLocation::SourceLocation | ( | const std::string & | filename, |
uint32_t | first_line = 0 , |
||
uint32_t | first_column = 0 , |
||
uint32_t | last_line = 0 , |
||
uint32_t | last_column = 0 |
||
) |
Constructs a source location object.
Definition at line 14 of file cqasm-annotations.cpp.
void cqasm::annotations::SourceLocation::expand_to_include | ( | uint32_t | line, |
uint32_t | column = 1 |
||
) |
Expands the location range to contain the given location in the source file.
Definition at line 39 of file cqasm-annotations.cpp.
std::string cqasm::annotations::SourceLocation::filename |
The name of the source file.
Definition at line 25 of file cqasm-annotations.hpp.
uint32_t cqasm::annotations::SourceLocation::first_line |
The first line of the range, or 0 if unknown.
Definition at line 30 of file cqasm-annotations.hpp.
uint32_t cqasm::annotations::SourceLocation::first_column |
The first column of the range, or 0 if unknown.
Definition at line 35 of file cqasm-annotations.hpp.
uint32_t cqasm::annotations::SourceLocation::last_line |
The last line of the range, or 0 if unknown.
Definition at line 40 of file cqasm-annotations.hpp.
uint32_t cqasm::annotations::SourceLocation::last_column |
The last column of the range, or 0 if unknown.
Definition at line 45 of file cqasm-annotations.hpp.