top | up | prev | next

ParsingContext Class

Definition at line 16 of ParsingContext.hpp

Constructors

ParsingContext()

Member Functions

void BeginFunctionBody()
void BeginParsingArguments()
void BeginParsingLvalue()
void BeginParsingTemplateId()
void EndFunctionBody()
void EndParsingArguments()
void EndParsingLvalue()
void EndParsingTemplateId()
SourceFileNode* GetSourceFileNode()
bool InFunctionBody() const
bool ParsingArguments() const
bool ParsingLvalue() const
bool ParsingLvalueAndNotArguments() const
bool ParsingTemplateId() const
bool ParsingTemplateIdOrLvalue() const
bool ParsingTemplateIdOrLvalueAndNotArguments() const
void SetSourceFileNode(SourceFileNode* sourceFileNode_)

Member Variables

bool inFunctionBody
std::stack<bool> inFunctionBodyStack
bool parsingArguments
std::stack<bool> parsingArgumentsStack
bool parsingLvalue
std::stack<bool> parsingLvalueStack
bool parsingTemplateId
std::stack<bool> parsingTemplateIdStack
SourceFileNode* sourceFileNode

Constructor Details

ParsingContext Constructor

sngcpp::cppparser::ParsingContext::ParsingContext()

Definition at line 10 of ParsingContext.cpp :
10 : parsingTemplateId(false)inFunctionBody(false)sourceFileNode(nullptr)parsingLvalue(false)parsingArguments(false)
11 {
12 }


Declaration at line 19 of ParsingContext.hpp


Member Function Details

BeginFunctionBody Member Function

void sngcpp::cppparser::ParsingContext::BeginFunctionBody()

Definition at line 26 of ParsingContext.cpp :
27 {
28     inFunctionBodyStack.push(inFunctionBody);
29     inFunctionBody = true;
30 }


Declaration at line 24 of ParsingContext.hpp

Called by: FunctionParser::FunctionBody


BeginParsingArguments Member Function

void sngcpp::cppparser::ParsingContext::BeginParsingArguments()

Definition at line 50 of ParsingContext.cpp :
51 {
52     parsingArgumentsStack.push(parsingArguments);
53     parsingArguments = true;
54 }


Declaration at line 30 of ParsingContext.hpp

Called by: ExpressionParser::PostfixExpression


BeginParsingLvalue Member Function

void sngcpp::cppparser::ParsingContext::BeginParsingLvalue()

Definition at line 38 of ParsingContext.cpp :
39 {
40     parsingLvalueStack.push(parsingLvalue);
41     parsingLvalue = true;
42 }


Declaration at line 27 of ParsingContext.hpp

Called by: ExpressionParser::AssignmentExpression


BeginParsingTemplateId Member Function

void sngcpp::cppparser::ParsingContext::BeginParsingTemplateId()

Definition at line 14 of ParsingContext.cpp :
15 {
16     parsingTemplateIdStack.push(parsingTemplateId);
17     parsingTemplateId = true;
18 }


Declaration at line 21 of ParsingContext.hpp

Called by: TemplateParser::SimpleTemplateId


EndFunctionBody Member Function

void sngcpp::cppparser::ParsingContext::EndFunctionBody()

Definition at line 32 of ParsingContext.cpp :
33 {
34     inFunctionBody = inFunctionBodyStack.top();
35     inFunctionBodyStack.pop();
36 }


Declaration at line 25 of ParsingContext.hpp

Called by: FunctionParser::FunctionBody


EndParsingArguments Member Function

void sngcpp::cppparser::ParsingContext::EndParsingArguments()

Definition at line 56 of ParsingContext.cpp :
57 {
58     parsingArguments = parsingArgumentsStack.top();
59     parsingArgumentsStack.pop();
60 }


Declaration at line 31 of ParsingContext.hpp

Called by: ExpressionParser::PostfixExpression


EndParsingLvalue Member Function

void sngcpp::cppparser::ParsingContext::EndParsingLvalue()

Definition at line 44 of ParsingContext.cpp :
45 {
46     parsingLvalue = parsingLvalueStack.top();
47     parsingLvalueStack.pop();
48 }


Declaration at line 28 of ParsingContext.hpp

Called by: ExpressionParser::AssignmentExpression


EndParsingTemplateId Member Function

void sngcpp::cppparser::ParsingContext::EndParsingTemplateId()

Definition at line 20 of ParsingContext.cpp :
21 {
22     parsingTemplateId = parsingTemplateIdStack.top();
23     parsingTemplateIdStack.pop();
24 }


Declaration at line 22 of ParsingContext.hpp

Called by: TemplateParser::SimpleTemplateId


GetSourceFileNode Member Function

SourceFileNode * sngcpp::cppparser::ParsingContext::GetSourceFileNode()

Definition at line 36 of ParsingContext.hpp :
36 { return sourceFileNode; }

Called by: DeclarationParser::UsingDeclaration , DeclarationParser::UsingDirective


InFunctionBody Member Function

bool sngcpp::cppparser::ParsingContext::InFunctionBody() const

Definition at line 23 of ParsingContext.hpp :
23 { return inFunctionBody; }

Called by: DeclaratorParser::Declarator


ParsingArguments Member Function

bool sngcpp::cppparser::ParsingContext::ParsingArguments() const

Definition at line 29 of ParsingContext.hpp :
29 { return parsingArguments; }


ParsingLvalue Member Function

bool sngcpp::cppparser::ParsingContext::ParsingLvalue() const

Definition at line 26 of ParsingContext.hpp :
26 { return parsingLvalue; }


ParsingLvalueAndNotArguments Member Function

bool sngcpp::cppparser::ParsingContext::ParsingLvalueAndNotArguments() const

Definition at line 34 of ParsingContext.hpp :
34 { return parsingLvalue && !parsingArguments; }

Called by: ExpressionParser::AdditiveExpression , ExpressionParser::AndExpression , ExpressionParser::EqualityExpression , ExpressionParser::ExclusiveOrExpression , ExpressionParser::InclusiveOrExpression , ExpressionParser::MultiplicativeExpression


ParsingTemplateId Member Function

bool sngcpp::cppparser::ParsingContext::ParsingTemplateId() const

Definition at line 20 of ParsingContext.hpp :
20 { return parsingTemplateId; }


ParsingTemplateIdOrLvalue Member Function

bool sngcpp::cppparser::ParsingContext::ParsingTemplateIdOrLvalue() const

Definition at line 32 of ParsingContext.hpp :
32 { return parsingTemplateId || parsingLvalue; }


ParsingTemplateIdOrLvalueAndNotArguments Member Function

bool sngcpp::cppparser::ParsingContext::ParsingTemplateIdOrLvalueAndNotArguments() const

Definition at line 33 of ParsingContext.hpp :
33 { return (parsingTemplateId || parsingLvalue) && !parsingArguments; }

Called by: ExpressionParser::LogicalAndExpression , ExpressionParser::LogicalOrExpression , ExpressionParser::RelationalExpression , ExpressionParser::ShiftExpression


SetSourceFileNode Member Function

void sngcpp::cppparser::ParsingContext::SetSourceFileNode(SourceFileNode * sourceFileNode_)

Definition at line 35 of ParsingContext.hpp :
35 { sourceFileNode = sourceFileNode_; }

Called by: SourceFileParser::SourceFile


top | up | prev | next