libqasm
library for handling cQASM files
Public Member Functions | Public Attributes | List of all members
cqasm::v1::ast::StringBuilder Class Reference

Special/temporary string builder node, used to build strings from fragments and escape sequences while parsing. More...

Public Member Functions

void push_string (const std::string &str)
 Pushes a string fragment into the string. More...
 
void push_escape (const std::string &escape)
 Pushes an escape sequence into the string. More...
 

Public Attributes

std::ostringstream stream
 

Detailed Description

Special/temporary string builder node, used to build strings from fragments and escape sequences while parsing.

This is abstracted out of the AST; it should never appear after parsing completes.

Definition at line 25 of file cqasm-v1-ast.hpp.

#include <cqasm-v1-ast.hpp>

Inheritance diagram for cqasm::v1::ast::StringBuilder:
Inheritance graph
[legend]
Collaboration diagram for cqasm::v1::ast::StringBuilder:
Collaboration graph
[legend]

Member Function Documentation

◆ push_string()

void cqasm::v1::ast::StringBuilder::push_string ( const std::string &  str)

Pushes a string fragment into the string.

Definition at line 15 of file cqasm-v1-ast.cpp.

◆ push_escape()

void cqasm::v1::ast::StringBuilder::push_escape ( const std::string &  escape)

Pushes an escape sequence into the string.

Definition at line 22 of file cqasm-v1-ast.cpp.

Member Data Documentation

◆ stream

std::ostringstream cqasm::v1::ast::StringBuilder::stream

Definition at line 27 of file cqasm-v1-ast.hpp.


The documentation for this class was generated from the following files: