sun::serialization::ASTDeserializer
class · Source (opens in a new tab)
class sun::serialization::ASTDeserializerDeserialize protobuf messages to AST nodes.
Public Functions
- ASTDeserializer
- deserialize
- deserializeFromString
- deserializeProgram
- deserializeProgramFromString
- deserializePrototype
ASTDeserializer
public · function · Source (opens in a new tab)
sun::serialization::ASTDeserializer::ASTDeserializer(DeserializerConfig config={})Creates a syntax-tree decoder using the supplied deserialization settings.
Related: DeserializerConfig
deserialize
public · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserialize(const pbc::ASTNode &node) constDeserialize any expression node.
Related: ExprAST
deserializeFromString
public · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeFromString(const std::string &data) constDeserialize from bytes (convenience).
Related: ExprAST
deserializeProgram
public · function · Source (opens in a new tab)
std::unique_ptr< BlockExprAST > sun::serialization::ASTDeserializer::deserializeProgram(const pbc::Program &program) constDeserialize a complete program.
Related: BlockExprAST
deserializeProgramFromString
public · function · Source (opens in a new tab)
std::unique_ptr< BlockExprAST > sun::serialization::ASTDeserializer::deserializeProgramFromString(const std::string &data) constReconstructs a program syntax tree from a protobuf byte string.
Related: BlockExprAST
deserializePrototype
public · function · Source (opens in a new tab)
std::unique_ptr< sun::ast::PrototypeAST > sun::serialization::ASTDeserializer::deserializePrototype(const pbc::Prototype &proto) constDeserialize a prototype.
Related: sun::ast::PrototypeAST
Private Functions
- deserializeArray
- deserializeArrayIndex
- deserializeBinary
- deserializeBlock
- deserializeBlockExpr
- deserializeBool
- deserializeCall
- deserializeCharLiteral
- deserializeClassDef
- deserializeCompoundAssignment
- deserializeConstantValue
- deserializeDeclareType
- deserializeEnumDef
- deserializeExprBase
- deserializeField
- deserializeFor
- deserializeForIn
- deserializeFunction
- deserializeGenericCall
- deserializeIdentity
- deserializeIf
- deserializeIndex
- deserializeIndexedAssignment
- deserializeInterfaceDef
- deserializeInterpolatedString
- deserializeLambda
- deserializeManifest
- deserializeMatch
- deserializeMemberAccess
- deserializeMemberAssignment
- deserializeMethodFunction
- deserializeModule
- deserializeNumber
- deserializePackExpansion
- deserializeParen
- deserializePosition
- deserializeQualifiedName
- deserializeReferenceCreation
- deserializeReturn
- deserializeSlice
- deserializeSliceExpr
- deserializeString
- deserializeStructLiteral
- deserializeTernary
- deserializeThrow
- deserializeToken
- deserializeTryCatch
- deserializeTypeAnnotation
- deserializeTypeParameters
- deserializeUnary
- deserializeUnsafeBlock
- deserializeUsing
- deserializeVariableAssignment
- deserializeVariableCreation
- deserializeVariableRef
- deserializeWhile
deserializeArray
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeArray(const pbc::ArrayLiteral &proto) constReconstructs a array literal and its child nodes from protobuf data.
Related: ExprAST
deserializeArrayIndex
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeArrayIndex(const pbc::ArrayIndexExpr &proto) constReconstructs a array index and its child nodes from protobuf data.
Related: ExprAST
deserializeBinary
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeBinary(const pbc::BinaryExpr &proto) constReconstructs a binary operation and its child nodes from protobuf data.
Related: ExprAST
deserializeBlock
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeBlock(const pbc::BlockExpr &proto) constReconstructs a lexical block and its child nodes from protobuf data.
Related: ExprAST
deserializeBlockExpr
private · function · Source (opens in a new tab)
std::unique_ptr< BlockExprAST > sun::serialization::ASTDeserializer::deserializeBlockExpr(const pbc::BlockExpr &proto) constHelper to deserialize a BlockExpr specifically.
Related: BlockExprAST
deserializeBool
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeBool(const pbc::BoolLiteral &proto) constReconstructs a boolean literal and its child nodes from protobuf data.
Related: ExprAST
deserializeCall
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeCall(const pbc::CallExpr &proto) constReconstructs a function call and its child nodes from protobuf data.
Related: ExprAST
deserializeCharLiteral
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeCharLiteral(const pbc::CharLiteral &proto) constReconstructs a character literal and its child nodes from protobuf data.
Related: ExprAST
deserializeClassDef
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeClassDef(const pbc::ClassDef &proto) constReconstructs a class declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeCompoundAssignment
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeCompoundAssignment(const pbc::CompoundAssignment &proto) constReconstructs a compound assignment and its child nodes from protobuf data.
Related: ExprAST
deserializeConstantValue
private · function · Source (opens in a new tab)
sun::semantic_analysis::constants::ConstantValue sun::serialization::ASTDeserializer::deserializeConstantValue(const pbc::ConstantValue &proto) constReads a value a library computed for one of its globals.
The result has no types yet; analysis fills them in from the global's type.
Related: sun::semantic_analysis::constants::ConstantValue
deserializeDeclareType
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeDeclareType(const pbc::DeclareType &proto) constReconstructs a forward type declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeEnumDef
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeEnumDef(const pbc::EnumDef &proto) constReconstructs a enum declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeExprBase
private · function · Source (opens in a new tab)
void sun::serialization::ASTDeserializer::deserializeExprBase(const pbc::ASTNode &node, ExprAST *expr) constRestore common ExprAST fields from the proto message.
deserializeField
private · function · Source (opens in a new tab)
template <typename FieldDecl, typename FieldProto>
FieldDecl sun::serialization::ASTDeserializer::deserializeField(const FieldProto &proto) constClass and interface fields are declared alike, so they load alike.
deserializeFor
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeFor(const pbc::ForExpr &proto) constReconstructs a for loop and its child nodes from protobuf data.
Related: ExprAST
deserializeForIn
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeForIn(const pbc::ForInExpr &proto) constReconstructs a iteration loop and its child nodes from protobuf data.
Related: ExprAST
deserializeFunction
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeFunction(const pbc::FunctionDef &proto) constReconstructs a function definition and its child nodes from protobuf data.
Related: ExprAST
deserializeGenericCall
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeGenericCall(const pbc::GenericCallExpr &proto) constReconstructs a generic function call and its child nodes from protobuf data.
Related: ExprAST
deserializeIdentity
private · function · Source (opens in a new tab)
void sun::serialization::ASTDeserializer::deserializeIdentity(const pbc::DeclarationIdentity &proto, sun::semantic_analysis::DeclarationIdentity &identity) constRetain validated portable identities until the declaration pass interns them.
Related: sun::semantic_analysis::DeclarationIdentity
deserializeIf
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeIf(const pbc::IfExpr &proto) constReconstructs a conditional expression and its child nodes from protobuf data.
Related: ExprAST
deserializeIndex
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeIndex(const pbc::IndexExpr &proto) constReconstructs a index expression and its child nodes from protobuf data.
Related: ExprAST
deserializeIndexedAssignment
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeIndexedAssignment(const pbc::IndexedAssignment &proto) constReconstructs a indexed assignment and its child nodes from protobuf data.
Related: ExprAST
deserializeInterfaceDef
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeInterfaceDef(const pbc::InterfaceDef &proto) constReconstructs a interface declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeInterpolatedString
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeInterpolatedString(const pbc::InterpolatedString &proto) constReconstructs a interpolated string and its child nodes from protobuf data.
Related: ExprAST
deserializeLambda
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeLambda(const pbc::LambdaExpr &proto) constReconstructs a lambda expression and its child nodes from protobuf data.
Related: ExprAST
deserializeManifest
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeManifest(const pbc::Manifest &proto) constReconstructs a dependency manifest and its child nodes from protobuf data.
Related: ExprAST
deserializeMatch
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeMatch(const pbc::MatchExpr &proto) constReconstructs a pattern match and its child nodes from protobuf data.
Related: ExprAST
deserializeMemberAccess
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeMemberAccess(const pbc::MemberAccess &proto) constReconstructs a member access and its child nodes from protobuf data.
Related: ExprAST
deserializeMemberAssignment
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeMemberAssignment(const pbc::MemberAssignment &proto) constReconstructs a member assignment and its child nodes from protobuf data.
Related: ExprAST
deserializeMethodFunction
private · function · Source (opens in a new tab)
std::unique_ptr< FunctionAST > sun::serialization::ASTDeserializer::deserializeMethodFunction(const pbc::FunctionDef &proto, bool emptyBodyMeansNone) constThe function behind a class or interface method.
An interface method with no statements is a bare declaration, so it comes back without a body; a class method with no statements has an empty body, and dropping that would leave the method looking like an extern declaration.
Related: sun::ast::FunctionAST
deserializeModule
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeModule(const pbc::ModuleDef &proto) constReconstructs a module declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeNumber
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeNumber(const pbc::NumberExpr &proto) constIndividual node type deserializers.
Related: ExprAST
deserializePackExpansion
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializePackExpansion(const pbc::PackExpansion &proto) constReconstructs a variadic argument expansion and its child nodes from protobuf data.
Related: ExprAST
deserializeParen
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeParen(const pbc::ParenExpr &proto) constReconstructs a parenthesized expression and its child nodes from protobuf data.
Related: ExprAST
deserializePosition
private · function · Source (opens in a new tab)
Position sun::serialization::ASTDeserializer::deserializePosition(const pbc::Position &pos) constPosition deserialization.
Related: sun::support::Position, Position
deserializeQualifiedName
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeQualifiedName(const pbc::QualifiedNameExpr &proto) constReconstructs a qualified name and its child nodes from protobuf data.
Related: ExprAST
deserializeReferenceCreation
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeReferenceCreation(const pbc::ReferenceCreation &proto) constReconstructs a reference creation and its child nodes from protobuf data.
Related: ExprAST
deserializeReturn
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeReturn(const pbc::ReturnExpr &proto) constReconstructs a return statement and its child nodes from protobuf data.
Related: ExprAST
deserializeSlice
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeSlice(const pbc::SliceExpr &proto) constReconstructs a slice expression and its child nodes from protobuf data.
Related: ExprAST
deserializeSliceExpr
private · function · Source (opens in a new tab)
std::unique_ptr< SliceExprAST > sun::serialization::ASTDeserializer::deserializeSliceExpr(const pbc::SliceExpr &proto) constReconstructs a slice expression and its child nodes from protobuf data.
Related: sun::ast::SliceExprAST
deserializeString
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeString(const pbc::StringLiteral &proto) constReconstructs a string literal and its child nodes from protobuf data.
Related: ExprAST
deserializeStructLiteral
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeStructLiteral(const pbc::StructLiteral &proto) constReconstructs a field initializer list and its child nodes from protobuf data.
Related: ExprAST
deserializeTernary
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeTernary(const pbc::TernaryExpr &proto) constReconstructs a conditional expression and its child nodes from protobuf data.
Related: ExprAST
deserializeThrow
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeThrow(const pbc::ThrowExpr &proto) constReconstructs a throw expression and its child nodes from protobuf data.
Related: ExprAST
deserializeToken
private · function · Source (opens in a new tab)
Token sun::serialization::ASTDeserializer::deserializeToken(const pbc::Token &token) constToken deserialization.
Related: sun::parsing::Token, Token
deserializeTryCatch
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeTryCatch(const pbc::TryCatch &proto) constReconstructs a error handler and its child nodes from protobuf data.
Related: ExprAST
deserializeTypeAnnotation
private · function · Source (opens in a new tab)
sun::ast::TypeAnnotation sun::serialization::ASTDeserializer::deserializeTypeAnnotation(const pbc::TypeAnnotation &type) constType annotation deserialization.
Related: sun::ast::TypeAnnotation
deserializeTypeParameters
private · function · Source (opens in a new tab)
template <typename Owner>
std::vector< sun::ast::TypeParameter > sun::serialization::ASTDeserializer::deserializeTypeParameters(const Owner &owner) constRestore parameters from current metadata or the legacy names-only field.
Related: sun::ast::TypeParameter
deserializeUnary
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeUnary(const pbc::UnaryExpr &proto) constReconstructs a unary operation and its child nodes from protobuf data.
Related: ExprAST
deserializeUnsafeBlock
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeUnsafeBlock(const pbc::UnsafeBlock &proto) constReconstructs a unsafe block and its child nodes from protobuf data.
Related: ExprAST
deserializeUsing
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeUsing(const pbc::UsingStmt &proto) constReconstructs a using declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeVariableAssignment
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeVariableAssignment(const pbc::VariableAssignment &proto) constReconstructs a variable assignment and its child nodes from protobuf data.
Related: ExprAST
deserializeVariableCreation
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeVariableCreation(const pbc::VariableCreation &proto) constReconstructs a variable declaration and its child nodes from protobuf data.
Related: ExprAST
deserializeVariableRef
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeVariableRef(const pbc::VariableReference &proto) constReconstructs a variable reference and its child nodes from protobuf data.
Related: ExprAST
deserializeWhile
private · function · Source (opens in a new tab)
std::unique_ptr< ExprAST > sun::serialization::ASTDeserializer::deserializeWhile(const pbc::WhileExpr &proto) constReconstructs a while loop and its child nodes from protobuf data.
Related: ExprAST
Private Fields
config_
private · variable · Source (opens in a new tab)
DeserializerConfig sun::serialization::ASTDeserializer::config_No documentation comment.
Related: DeserializerConfig