Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ASTNodeAnnotation Struct Reference

#include <ored/scripting/grammar.hpp>

+ Collaboration diagram for ASTNodeAnnotation:

Public Member Functions

 ASTNodeAnnotation (std::stack< ASTNodePtr > &evalStack, const ScriptGrammarIterator first)
 
void operator() (const ScriptGrammarIterator f, const ScriptGrammarIterator l) const
 

Public Attributes

std::stack< ASTNodePtr > & evalStack_
 
const ScriptGrammarIterator first_
 

Detailed Description

Definition at line 50 of file grammar.hpp.

Constructor & Destructor Documentation

◆ ASTNodeAnnotation()

ASTNodeAnnotation ( std::stack< ASTNodePtr > &  evalStack,
const ScriptGrammarIterator  first 
)

Definition at line 51 of file grammar.hpp.

52 : evalStack_(evalStack), first_(first) {}
const ScriptGrammarIterator first_
Definition: grammar.hpp:55
std::stack< ASTNodePtr > & evalStack_
Definition: grammar.hpp:54

Member Function Documentation

◆ operator()()

void operator() ( const ScriptGrammarIterator  f,
const ScriptGrammarIterator  l 
) const

Definition at line 256 of file grammar.cpp.

256 {
257 QL_REQUIRE(!evalStack_.empty(), "eval stack is empty");
258 ASTNodePtr& n = evalStack_.top();
259 n->locationInfo.initialised = true;
260 n->locationInfo.lineStart = boost::spirit::get_line(f);
261 n->locationInfo.columnStart = boost::spirit::get_column(first_, f);
262 n->locationInfo.lineEnd = boost::spirit::get_line(l);
263 n->locationInfo.columnEnd = boost::spirit::get_column(first_, l);
264}
QuantLib::ext::shared_ptr< ASTNode > ASTNodePtr
Definition: ast.hpp:46

Member Data Documentation

◆ evalStack_

std::stack<ASTNodePtr>& evalStack_

Definition at line 54 of file grammar.hpp.

◆ first_

const ScriptGrammarIterator first_

Definition at line 55 of file grammar.hpp.