top | up | prev | next

InvokeNode Class

Definition at line 382 of Expression.hpp

Constructors

InvokeNode(const Span& span_)
InvokeNode(const Span& span_, Node* subject_)

Member Functions

void Accept(Visitor& visitor) override
void AddArgument(Node* argument) override
const NodeList<Node>& Arguments() const
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
const Node* Subject() const
Node* Subject()
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

NodeList<Node> arguments
std::unique_ptr<Node> subject

Constructor Details

InvokeNode Constructor

sngcm::ast::InvokeNode::InvokeNode(const Span& span_)

Definition at line 853 of Expression.cpp :
 853 : Node(NodeType::invokeNodespan_)subject()arguments()
 854 {
 855 }


Declaration at line 385 of Expression.hpp


InvokeNode Constructor

sngcm::ast::InvokeNode::InvokeNode(const Span& span_, Node * subject_)

Definition at line 857 of Expression.cpp :
 857 : Node(NodeType::invokeNodespan_)subject(subject_)arguments()
 858 {
 859     subject->SetParent(this);
 860 }


Declaration at line 386 of Expression.hpp


Member Function Details

Accept Member Function

void sngcm::ast::InvokeNode::Accept(Visitor & visitor) override

Definition at line 874 of Expression.cpp :
 875 {
 876     visitor.Visit(*this);
 877 }


Declaration at line 388 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::Accept

Calls: sngcm::ast::Visitor::Visit


AddArgument Member Function

void sngcm::ast::InvokeNode::AddArgument(Node * argument) override

Definition at line 895 of Expression.cpp :
 896 {
 897     argument->SetParent(this);
 898     arguments.Add(argument);
 899 }


Declaration at line 391 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::AddArgument

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::InvokeNode::Clone


Arguments Member Function

const NodeList <Node >& sngcm::ast::InvokeNode::Arguments() const

Definition at line 394 of Expression.hpp :
394 { return arguments; }

Called by: sngcm::ast::SourceWriter::Visit


Clone Member Function

Node * sngcm::ast::InvokeNode::Clone(CloneContext & cloneContext) const override

Definition at line 862 of Expression.cpp :
 863 {
 864     InvokeNode* clone = new InvokeNode(GetSpan()subject->Clone(cloneContext));
 865     int n = arguments.Count();
 866     for (int i = 0; i < n; ++i)
 867     {
 868         Node* argument = arguments[i];
 869         clone->AddArgument(argument->Clone(cloneContext));
 870     }
 871     return clone;
 872 }


Declaration at line 387 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::Clone

Calls: sngcm::ast::InvokeNode::AddArgument , sngcm::ast::InvokeNode::Clone , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::InvokeNode::Clone


Read Member Function

void sngcm::ast::InvokeNode::Read(AstReader & reader) override

Definition at line 886 of Expression.cpp :
 887 {
 888     Node::Read(reader);
 889     subject.reset(reader.ReadNode());
 890     subject->SetParent(this);
 891     arguments.Read(reader);
 892     arguments.SetParent(this);
 893 }


Declaration at line 390 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::Read

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent


Subject Member Function

const Node * sngcm::ast::InvokeNode::Subject() const

Definition at line 392 of Expression.hpp :
392 { return subject.get(); }


Subject Member Function

Node * sngcm::ast::InvokeNode::Subject()

Definition at line 393 of Expression.hpp :
393 { return subject.get(); }

Called by: sngcm::ast::SourceWriter::Visit


ToString Member Function

std::string sngcm::ast::InvokeNode::ToString() const override

Definition at line 901 of Expression.cpp
Declaration at line 395 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::ToString

Calls: sngcm::ast::InvokeNode::ToString , sngcm::ast::NodeList::Count

Called by: sngcm::ast::InvokeNode::ToString


Write Member Function

void sngcm::ast::InvokeNode::Write(AstWriter & writer) override

Definition at line 879 of Expression.cpp :
 880 {
 881     Node::Write(writer);
 882     writer.Write(subject.get());
 883     arguments.Write(writer);
 884 }


Declaration at line 389 of Expression.hpp

Base class overridden functions: sngcm::ast::Node::Write

Calls: sngcm::ast::Node::Write , sngcm::ast::NodeList::Write


top | up | prev | next