81 void *scanner =
nullptr;
104 ParseHelper(
const std::string &filename,
const std::string &data,
bool use_file);
110 ParseHelper(
const std::string &filename, FILE *fptr);
132 void push_error(
const std::string &error);
Defines the types for the cQASM abstract syntax tree, based on the classes from cqasm::tree.
Contains annotation objects used within the trees by libqasm.
Toplevel namespace with entry points for the new API.
Source location annotation object, containing source file line numbers etc.
std::vector< std::string > errors
List of accumulated errors.
Internal helper class for parsing cQASM files.
cqasm::tree::One< T > One
Namespace for the "new" cQASM 1.x API.
ast::One< ast::Root > root
Root node of the AST, if analysis was sufficiently successful.
std::string filename
Name of the file being parsed.
ParseResult result
The parse result.
Parse result information.
ParseResult parse_string(const std::string &data, const std::string &filename)
Parse the given string.
ParseResult parse_file(const std::string &filename)
Parse the given file.
annotations::SourceLocation SourceLocation