top | up | prev | next

Reader Class

Definition at line 21 of Reader.hpp

Constructors

Reader(soulng::util::BinaryReader& binaryReader_)

Member Functions

soulng::util::BinaryReader& GetBinaryReader()
void Read(soulng::lexer::Span& span)
Base ReadBase()
ClassKey ReadClassKey()
CompoundStatementNode* ReadCompoundStatementNode()
EnumKey ReadEnumKey()
IdentifierNode* ReadIdentifierNode()
NamespaceNode* ReadNamespaceNode()
Node* ReadNode()
NodeType ReadNodeType()
Operator ReadOperator()
SimpleTypeSpecifier ReadSimpleTypeSpecifier()
Specifier ReadSpecifiers()
StringLiteralNode* ReadStringLiteralNode()
Suffix ReadSuffix()

Member Variables

soulng::util::BinaryReader& binaryReader

Constructor Details

Reader Constructor

sngcpp::ast::Reader::Reader(soulng::util::BinaryReader& binaryReader_)

Definition at line 10 of Reader.cpp :
 10 : binaryReader(binaryReader_)
 11 {
 12 }


Declaration at line 24 of Reader.hpp


Member Function Details

GetBinaryReader Member Function

soulng::util::BinaryReader& sngcpp::ast::Reader::GetBinaryReader()

Definition at line 26 of Reader.hpp :
26 { return binaryReader; }

Called by: sngcpp::ast::AliasDeclarationNode::Read , sngcpp::ast::ArrayDeclaratorNode::Read , sngcpp::ast::BinaryNode::Read , sngcpp::ast::BooleanLiteralNode::Read , sngcpp::ast::CharacterLiteralNode::Read , sngcpp::ast::ClassNode::Read , sngcpp::ast::DeleteExpressionNode::Read , sngcpp::ast::EnumTypeNode::Read , sngcpp::ast::EnumeratorNode::Read , sngcpp::ast::FloatingLiteralNode::Read , sngcpp::ast::ForStatementNode::Read , sngcpp::ast::FunctionDeclaratorNode::Read , sngcpp::ast::FunctionNode::Read , sngcpp::ast::FunctionPtrIdNode::Read , sngcpp::ast::GotoStatementNode::Read , sngcpp::ast::IdentifierNode::Read , sngcpp::ast::IfStatementNode::Read , sngcpp::ast::InitDeclaratorNode::Read , sngcpp::ast::IntegerLiteralNode::Read , sngcpp::ast::InvokeExpressionNode::Read , sngcpp::ast::LabeledStatementNode::Read , sngcpp::ast::LambdaExpressionNode::Read , sngcpp::ast::LinkageSpecificationNode::Read , sngcpp::ast::LiteralNode::Read , sngcpp::ast::MemberAccessDeclarationNode::Read , sngcpp::ast::MemberDeclarationNode::Read , sngcpp::ast::MemberFunctionPtrIdNode::Read , sngcpp::ast::MemberInitializerNode::Read , sngcpp::ast::NamespaceNode::Read , sngcpp::ast::NewExpressionNode::Read , sngcpp::ast::ParameterNode::Read , sngcpp::ast::ReturnStatementNode::Read , sngcpp::ast::SimpleDeclarationNode::Read , sngcpp::ast::SimpleTypeNode::Read , sngcpp::ast::SourceFileNode::Read , sngcpp::ast::SpecialMemberFunctionNode::Read , sngcpp::ast::StringLiteralNode::Read , sngcpp::ast::TemplateIdNode::Read , sngcpp::ast::TryStatementNode::Read , sngcpp::ast::TypeParameterNode::Read , sngcpp::ast::UnaryNode::Read


Read Member Function

void sngcpp::ast::Reader::Read(soulng::lexer::Span& span)

Definition at line 14 of Reader.cpp :
 15 {
 16     span.fileIndex = binaryReader.ReadInt();
 17     span.line = binaryReader.ReadInt();
 18     span.start = binaryReader.ReadInt();
 19     span.end = binaryReader.ReadInt();
 20 }


Declaration at line 25 of Reader.hpp

Called by: sngcpp::ast::BracedInitializerListNode::Read , sngcpp::ast::ClassNode::Read , sngcpp::ast::CompoundStatementNode::Read , sngcpp::ast::DoStatementNode::Read , sngcpp::ast::EnumTypeNode::Read , sngcpp::ast::EnumeratorNode::Read , sngcpp::ast::IfStatementNode::Read , sngcpp::ast::Node::Read


ReadBase Member Function

Base sngcpp::ast::Reader::ReadBase()

Definition at line 58 of Reader.cpp :
 59 {
 60     return Base(binaryReader.ReadByte());
 61 }


Declaration at line 34 of Reader.hpp

Called by: sngcpp::ast::IntegerLiteralNode::Read


ReadClassKey Member Function

ClassKey sngcpp::ast::Reader::ReadClassKey()

Definition at line 38 of Reader.cpp :
 39 {
 40     return ClassKey(binaryReader.ReadByte());
 41 }


Declaration at line 30 of Reader.hpp

Called by: sngcpp::ast::ClassNode::Read , sngcpp::ast::ElaborateClassNameNode::Read , sngcpp::ast::ForwardClassDeclarationNode::Read


ReadCompoundStatementNode Member Function

CompoundStatementNode * sngcpp::ast::Reader::ReadCompoundStatementNode()

Definition at line 71 of Reader.cpp
Declaration at line 36 of Reader.hpp

Calls: sngcpp::ast::Node::GetNodeType , sngcpp::ast::Reader::ReadNode

Called by: sngcpp::ast::FunctionNode::Read , sngcpp::ast::HandlerNode::Read , sngcpp::ast::LambdaExpressionNode::Read , sngcpp::ast::SpecialMemberFunctionNode::Read , sngcpp::ast::TryStatementNode::Read


ReadEnumKey Member Function

EnumKey sngcpp::ast::Reader::ReadEnumKey()

Definition at line 43 of Reader.cpp :
 44 {
 45     return EnumKey(binaryReader.ReadByte());
 46 }


Declaration at line 31 of Reader.hpp

Called by: sngcpp::ast::EnumTypeNode::Read


ReadIdentifierNode Member Function

IdentifierNode * sngcpp::ast::Reader::ReadIdentifierNode()

Definition at line 110 of Reader.cpp
Declaration at line 39 of Reader.hpp

Calls: sngcpp::ast::Node::GetNodeType , sngcpp::ast::Reader::ReadNode

Called by: sngcpp::ast::TemplateIdNode::Read


ReadNamespaceNode Member Function

NamespaceNode * sngcpp::ast::Reader::ReadNamespaceNode()

Definition at line 97 of Reader.cpp
Declaration at line 38 of Reader.hpp

Calls: sngcpp::ast::Node::GetNodeType , sngcpp::ast::Reader::ReadNode

Called by: sngcpp::ast::SourceFileNode::Read


ReadNode Member Function

Node * sngcpp::ast::Reader::ReadNode()

Definition at line 63 of Reader.cpp :
 64 {
 65     NodeType nodeType = ReadNodeType();
 66     Node* node = NodeFactory::Instance().CreateNode(nodeType);
 67     node->Read(*this);
 68     return node;
 69 }


Declaration at line 35 of Reader.hpp

Calls: sngcpp::ast::Node::Read , sngcpp::ast::NodeFactory::CreateNode , sngcpp::ast::NodeFactory::Instance , sngcpp::ast::Reader::ReadNodeType

Called by: sngcpp::ast::AliasDeclarationNode::Read , sngcpp::ast::ArrayDeclaratorNode::Read , sngcpp::ast::ArrowNode::Read , sngcpp::ast::BaseClassSpecifierNode::Read , sngcpp::ast::BinaryNode::Read , sngcpp::ast::CaseStatementNode::Read , sngcpp::ast::CastExpressionNode::Read , sngcpp::ast::ClassNode::Read , sngcpp::ast::ConditionalExpressionNode::Read , sngcpp::ast::ConversionFunctionIdNode::Read , sngcpp::ast::CppCastExpressionNode::Read , sngcpp::ast::DoStatementNode::Read , sngcpp::ast::DotNode::Read , sngcpp::ast::ElaborateClassNameNode::Read , sngcpp::ast::EnumTypeNode::Read , sngcpp::ast::EnumeratorNode::Read , sngcpp::ast::ForStatementNode::Read , sngcpp::ast::ForwardClassDeclarationNode::Read , sngcpp::ast::FunctionDeclaratorNode::Read , sngcpp::ast::FunctionNode::Read , sngcpp::ast::HandlerNode::Read , sngcpp::ast::IdDeclaratorNode::Read , sngcpp::ast::IfStatementNode::Read , sngcpp::ast::InitDeclaratorNode::Read , sngcpp::ast::InvokeExpressionNode::Read , sngcpp::ast::LambdaExpressionNode::Read , sngcpp::ast::LinkageSpecificationNode::Read , sngcpp::ast::MemberAccessDeclarationNode::Read , sngcpp::ast::MemberDeclarationNode::Read , sngcpp::ast::MemberFunctionPtrIdNode::Read , sngcpp::ast::MemberInitializerNode::Read , sngcpp::ast::NewExpressionNode::Read , sngcpp::ast::ParameterNode::Read , sngcpp::ast::RangeForStatementNode::Read , sngcpp::ast::Reader::ReadCompoundStatementNode , sngcpp::ast::Reader::ReadIdentifierNode , sngcpp::ast::Reader::ReadNamespaceNode , sngcpp::ast::Reader::ReadStringLiteralNode , sngcpp::ast::ReturnStatementNode::Read , sngcpp::ast::SimpleDeclarationNode::Read , sngcpp::ast::SpecialMemberFunctionNode::Read , sngcpp::ast::SubscriptExpressionNode::Read , sngcpp::ast::SwitchStatementNode::Read , sngcpp::ast::TemplateArgumentNode::Read , sngcpp::ast::TemplateDeclarationNode::Read , sngcpp::ast::TemplateIdNode::Read , sngcpp::ast::TryStatementNode::Read , sngcpp::ast::TypeParameterNode::Read , sngcpp::ast::TypedefNode::Read , sngcpp::ast::UnaryNode::Read , sngcpp::ast::UsingDeclarationNode::Read , sngcpp::ast::UsingDirectiveNode::Read , sngcpp::ast::WhileStatementNode::Read


ReadNodeType Member Function

NodeType sngcpp::ast::Reader::ReadNodeType()

Definition at line 27 of Reader.cpp :
 28 {
 29     uint8_t x = binaryReader.ReadByte();
 30     return static_cast<NodeType>(x);
 31 }


Declaration at line 28 of Reader.hpp

Called by: sngcpp::ast::Reader::ReadNode


ReadOperator Member Function

Operator sngcpp::ast::Reader::ReadOperator()

Definition at line 48 of Reader.cpp :
 49 {
 50     return Operator(binaryReader.ReadByte());
 51 }


Declaration at line 32 of Reader.hpp

Called by: sngcpp::ast::AdditiveExpressionNode::Read , sngcpp::ast::AssignmentExpressionNode::Read , sngcpp::ast::CppCastExpressionNode::Read , sngcpp::ast::EqualityExpressionNode::Read , sngcpp::ast::MultiplicativeExpressionNode::Read , sngcpp::ast::OperatorFunctionIdNode::Read , sngcpp::ast::PMExpressionNode::Read , sngcpp::ast::RelationalExpressionNode::Read , sngcpp::ast::ShiftExpressionNode::Read , sngcpp::ast::UnaryExpressionNode::Read


ReadSimpleTypeSpecifier Member Function

SimpleTypeSpecifier sngcpp::ast::Reader::ReadSimpleTypeSpecifier()

Definition at line 22 of Reader.cpp :
 23 {
 24     return SimpleTypeSpecifier(binaryReader.ReadByte());
 25 }


Declaration at line 27 of Reader.hpp

Called by: sngcpp::ast::SimpleTypeNode::Read


ReadSpecifiers Member Function

Specifier sngcpp::ast::Reader::ReadSpecifiers()

Definition at line 33 of Reader.cpp :
 34 {
 35     return Specifier(binaryReader.ReadUInt());
 36 }


Declaration at line 29 of Reader.hpp

Called by: sngcpp::ast::BaseClassSpecifierNode::Read , sngcpp::ast::ClassNode::Read , sngcpp::ast::FunctionDeclaratorNode::Read , sngcpp::ast::FunctionNode::Read , sngcpp::ast::MemberAccessDeclarationNode::Read , sngcpp::ast::MemberDeclarationNode::Read , sngcpp::ast::SimpleDeclarationNode::Read , sngcpp::ast::SpecialMemberFunctionNode::Read


ReadStringLiteralNode Member Function

StringLiteralNode * sngcpp::ast::Reader::ReadStringLiteralNode()

Definition at line 84 of Reader.cpp
Declaration at line 37 of Reader.hpp

Calls: sngcpp::ast::Node::GetNodeType , sngcpp::ast::Reader::ReadNode

Called by: sngcpp::ast::LinkageSpecificationNode::Read


ReadSuffix Member Function

Suffix sngcpp::ast::Reader::ReadSuffix()

Definition at line 53 of Reader.cpp :
 54 {
 55     return Suffix(binaryReader.ReadByte());
 56 }


Declaration at line 33 of Reader.hpp

Called by: sngcpp::ast::FloatingLiteralNode::Read , sngcpp::ast::IntegerLiteralNode::Read


top | up | prev | next