ast

package
v0.0.0-...-6e409f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsExprNode

func AsExprNode(x core.INode) core.IExprNode

func AsExprNodes

func AsExprNodes(xs []core.INode) []core.IExprNode

func AsSlot

func AsSlot(x core.INode) core.ISlot

func AsSlots

func AsSlots(xs []core.INode) []core.ISlot

func AsStmtNode

func AsStmtNode(x core.INode) core.IStmtNode

func AsStmtNodes

func AsStmtNodes(xs []core.INode) []core.IStmtNode

func AsTypeNode

func AsTypeNode(x core.INode) core.ITypeNode

func AsTypeNodes

func AsTypeNodes(xs []core.INode) []core.ITypeNode

func NewExprNodes

func NewExprNodes(xs ...core.IExprNode) []core.IExprNode

func NewNodes

func NewNodes(xs ...core.INode) []core.INode

func NewStmtNodes

func NewStmtNodes(xs ...core.IStmtNode) []core.IStmtNode

func VisitExprNode

func VisitExprNode(v INodeVisitor, expr core.IExprNode) interface{}

func VisitExprNodes

func VisitExprNodes(v INodeVisitor, exprs []core.IExprNode) interface{}

func VisitStmtNode

func VisitStmtNode(v INodeVisitor, stmt core.IStmtNode) interface{}

func VisitStmtNodes

func VisitStmtNodes(v INodeVisitor, stmts []core.IStmtNode) interface{}

func VisitTypeDefinition

func VisitTypeDefinition(v INodeVisitor, typedef core.ITypeDefinition) interface{}

func VisitTypeDefinitions

func VisitTypeDefinitions(v INodeVisitor, typedefs []core.ITypeDefinition) interface{}

Types

type AST

type AST struct {
	ClassName   string
	Location    core.Location
	Declaration *Declaration
	// contains filtered or unexported fields
}

func NewAST

func NewAST(loc core.Location, declaration *Declaration) *AST

func (*AST) GenerateIR

func (self *AST) GenerateIR() *ir.IR

func (*AST) GetConstantTable

func (self *AST) GetConstantTable() *entity.ConstantTable

func (*AST) GetConstants

func (self *AST) GetConstants() []*entity.Constant

func (*AST) GetDeclaration

func (self *AST) GetDeclaration() *Declaration

func (*AST) GetDefinedFunctions

func (self *AST) GetDefinedFunctions() []*entity.DefinedFunction

func (*AST) GetDefinedVariables

func (self *AST) GetDefinedVariables() []*entity.DefinedVariable

func (AST) GetLocation

func (self AST) GetLocation() core.Location

func (*AST) GetScope

func (self *AST) GetScope() *entity.ToplevelScope

func (*AST) ListDeclarations

func (self *AST) ListDeclarations() []core.IEntity

func (*AST) ListDefinitions

func (self *AST) ListDefinitions() []core.IEntity

func (*AST) ListEntities

func (self *AST) ListEntities() []core.IEntity

func (*AST) ListTypes

func (self *AST) ListTypes() []core.ITypeDefinition

func (*AST) SetConstantTable

func (self *AST) SetConstantTable(table *entity.ConstantTable)

func (*AST) SetConstants

func (self *AST) SetConstants(xs []*entity.Constant)

func (*AST) SetDefinedFunctions

func (self *AST) SetDefinedFunctions(xs []*entity.DefinedFunction)

func (*AST) SetDefinedVariables

func (self *AST) SetDefinedVariables(xs []*entity.DefinedVariable)

func (*AST) SetScope

func (self *AST) SetScope(scope *entity.ToplevelScope)

func (AST) String

func (self AST) String() string

type AddressNode

type AddressNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	Type      core.IType
}

AddressNode

func NewAddressNode

func NewAddressNode(loc core.Location, expr core.IExprNode) *AddressNode

func (*AddressNode) AsExprNode

func (self *AddressNode) AsExprNode() core.IExprNode

func (*AddressNode) GetExpr

func (self *AddressNode) GetExpr() core.IExprNode

func (AddressNode) GetLocation

func (self AddressNode) GetLocation() core.Location

func (*AddressNode) GetOrigType

func (self *AddressNode) GetOrigType() core.IType

func (*AddressNode) GetType

func (self *AddressNode) GetType() core.IType

func (*AddressNode) IsAssignable

func (self *AddressNode) IsAssignable() bool

func (*AddressNode) IsCallable

func (self *AddressNode) IsCallable() bool

func (*AddressNode) IsConstant

func (self *AddressNode) IsConstant() bool

func (*AddressNode) IsLoadable

func (self *AddressNode) IsLoadable() bool

func (*AddressNode) IsLvalue

func (self *AddressNode) IsLvalue() bool

func (*AddressNode) IsParameter

func (self *AddressNode) IsParameter() bool

func (*AddressNode) IsPointer

func (self *AddressNode) IsPointer() bool

func (*AddressNode) SetType

func (self *AddressNode) SetType(t core.IType)

func (AddressNode) String

func (self AddressNode) String() string

type ArefNode

type ArefNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	Index     core.IExprNode
	Type      core.IType
}

ArefNode

func NewArefNode

func NewArefNode(loc core.Location, expr core.IExprNode, index core.IExprNode) *ArefNode

func (*ArefNode) AsExprNode

func (self *ArefNode) AsExprNode() core.IExprNode

func (*ArefNode) GetBaseExpr

func (self *ArefNode) GetBaseExpr() core.IExprNode

func (*ArefNode) GetElementSize

func (self *ArefNode) GetElementSize() int

func (*ArefNode) GetExpr

func (self *ArefNode) GetExpr() core.IExprNode

func (*ArefNode) GetIndex

func (self *ArefNode) GetIndex() core.IExprNode

func (*ArefNode) GetLength

func (self *ArefNode) GetLength() int

func (ArefNode) GetLocation

func (self ArefNode) GetLocation() core.Location

func (*ArefNode) GetOrigType

func (self *ArefNode) GetOrigType() core.IType

func (*ArefNode) GetType

func (self *ArefNode) GetType() core.IType

func (*ArefNode) IsAssignable

func (self *ArefNode) IsAssignable() bool

func (*ArefNode) IsCallable

func (self *ArefNode) IsCallable() bool

func (*ArefNode) IsConstant

func (self *ArefNode) IsConstant() bool

func (*ArefNode) IsLoadable

func (self *ArefNode) IsLoadable() bool

func (*ArefNode) IsLvalue

func (self *ArefNode) IsLvalue() bool

func (*ArefNode) IsMultiDimension

func (self *ArefNode) IsMultiDimension() bool

func (*ArefNode) IsParameter

func (self *ArefNode) IsParameter() bool

func (*ArefNode) IsPointer

func (self *ArefNode) IsPointer() bool

func (*ArefNode) SetType

func (self *ArefNode) SetType(t core.IType)

func (ArefNode) String

func (self ArefNode) String() string

type AssignNode

type AssignNode struct {
	ClassName string
	Location  core.Location
	LHS       core.IExprNode
	RHS       core.IExprNode
}

AssignNode

func NewAssignNode

func NewAssignNode(loc core.Location, lhs core.IExprNode, rhs core.IExprNode) *AssignNode

func (*AssignNode) AsExprNode

func (self *AssignNode) AsExprNode() core.IExprNode

func (*AssignNode) GetLHS

func (self *AssignNode) GetLHS() core.IExprNode

func (AssignNode) GetLocation

func (self AssignNode) GetLocation() core.Location

func (*AssignNode) GetOrigType

func (self *AssignNode) GetOrigType() core.IType

func (*AssignNode) GetRHS

func (self *AssignNode) GetRHS() core.IExprNode

func (*AssignNode) GetType

func (self *AssignNode) GetType() core.IType

func (*AssignNode) IsAssignable

func (self *AssignNode) IsAssignable() bool

func (*AssignNode) IsCallable

func (self *AssignNode) IsCallable() bool

func (*AssignNode) IsConstant

func (self *AssignNode) IsConstant() bool

func (*AssignNode) IsLoadable

func (self *AssignNode) IsLoadable() bool

func (*AssignNode) IsLvalue

func (self *AssignNode) IsLvalue() bool

func (*AssignNode) IsParameter

func (self *AssignNode) IsParameter() bool

func (*AssignNode) IsPointer

func (self *AssignNode) IsPointer() bool

func (*AssignNode) SetLHS

func (self *AssignNode) SetLHS(expr core.IExprNode)

func (*AssignNode) SetRHS

func (self *AssignNode) SetRHS(expr core.IExprNode)

func (*AssignNode) SetType

func (self *AssignNode) SetType(t core.IType)

func (AssignNode) String

func (self AssignNode) String() string

type BinaryOpNode

type BinaryOpNode struct {
	ClassName string
	Location  core.Location
	Operator  string
	Left      core.IExprNode
	Right     core.IExprNode
	Type      core.IType
}

BinaryOpNode

func NewBinaryOpNode

func NewBinaryOpNode(loc core.Location, operator string, left core.IExprNode, right core.IExprNode) *BinaryOpNode

func (*BinaryOpNode) AsExprNode

func (self *BinaryOpNode) AsExprNode() core.IExprNode

func (*BinaryOpNode) GetLeft

func (self *BinaryOpNode) GetLeft() core.IExprNode

func (BinaryOpNode) GetLocation

func (self BinaryOpNode) GetLocation() core.Location

func (*BinaryOpNode) GetOperator

func (self *BinaryOpNode) GetOperator() string

func (*BinaryOpNode) GetOrigType

func (self *BinaryOpNode) GetOrigType() core.IType

func (*BinaryOpNode) GetRight

func (self *BinaryOpNode) GetRight() core.IExprNode

func (*BinaryOpNode) GetType

func (self *BinaryOpNode) GetType() core.IType

func (*BinaryOpNode) IsAssignable

func (self *BinaryOpNode) IsAssignable() bool

func (*BinaryOpNode) IsCallable

func (self *BinaryOpNode) IsCallable() bool

func (*BinaryOpNode) IsConstant

func (self *BinaryOpNode) IsConstant() bool

func (*BinaryOpNode) IsLoadable

func (self *BinaryOpNode) IsLoadable() bool

func (*BinaryOpNode) IsLvalue

func (self *BinaryOpNode) IsLvalue() bool

func (*BinaryOpNode) IsParameter

func (self *BinaryOpNode) IsParameter() bool

func (*BinaryOpNode) IsPointer

func (self *BinaryOpNode) IsPointer() bool

func (*BinaryOpNode) SetLeft

func (self *BinaryOpNode) SetLeft(expr core.IExprNode)

func (*BinaryOpNode) SetRight

func (self *BinaryOpNode) SetRight(expr core.IExprNode)

func (*BinaryOpNode) SetType

func (self *BinaryOpNode) SetType(t core.IType)

func (BinaryOpNode) String

func (self BinaryOpNode) String() string

type BlockNode

type BlockNode struct {
	ClassName string
	Location  core.Location
	Variables []*entity.DefinedVariable
	Stmts     []core.IStmtNode
	// contains filtered or unexported fields
}

BlockNode

func NewBlockNode

func NewBlockNode(loc core.Location, variables []*entity.DefinedVariable, stmts []core.IStmtNode) *BlockNode

func (*BlockNode) AsStmtNode

func (self *BlockNode) AsStmtNode() core.IStmtNode

func (BlockNode) GetLocation

func (self BlockNode) GetLocation() core.Location

func (*BlockNode) GetScope

func (self *BlockNode) GetScope() core.IScope

func (*BlockNode) GetStmts

func (self *BlockNode) GetStmts() []core.IStmtNode

func (*BlockNode) GetVariables

func (self *BlockNode) GetVariables() []*entity.DefinedVariable

func (*BlockNode) SetScope

func (self *BlockNode) SetScope(scope *entity.LocalScope)

func (BlockNode) String

func (self BlockNode) String() string

type BreakNode

type BreakNode struct {
	ClassName string
	Location  core.Location
}

BreakNode

func NewBreakNode

func NewBreakNode(loc core.Location) *BreakNode

func (*BreakNode) AsStmtNode

func (self *BreakNode) AsStmtNode() core.IStmtNode

func (BreakNode) GetLocation

func (self BreakNode) GetLocation() core.Location

func (BreakNode) GetScope

func (self BreakNode) GetScope() core.IScope

func (BreakNode) String

func (self BreakNode) String() string

type CaseNode

type CaseNode struct {
	ClassName string
	Location  core.Location
	Label     *asm.Label
	Values    []core.IExprNode
	Body      core.IStmtNode
}

CaseNode

func NewCaseNode

func NewCaseNode(loc core.Location, values []core.IExprNode, body core.IStmtNode) *CaseNode

func (*CaseNode) AsStmtNode

func (self *CaseNode) AsStmtNode() core.IStmtNode

func (*CaseNode) GetBody

func (self *CaseNode) GetBody() core.IStmtNode

func (*CaseNode) GetLabel

func (self *CaseNode) GetLabel() *asm.Label

func (CaseNode) GetLocation

func (self CaseNode) GetLocation() core.Location

func (CaseNode) GetScope

func (self CaseNode) GetScope() core.IScope

func (*CaseNode) GetValues

func (self *CaseNode) GetValues() []core.IExprNode

func (*CaseNode) IsDefault

func (self *CaseNode) IsDefault() bool

func (*CaseNode) SetLabel

func (self *CaseNode) SetLabel(label *asm.Label)

func (CaseNode) String

func (self CaseNode) String() string

type CastNode

type CastNode struct {
	ClassName string
	Location  core.Location
	TypeNode  core.ITypeNode
	Expr      core.IExprNode
	Type      core.IType
}

CastNode

func NewCastNode

func NewCastNode(loc core.Location, t core.ITypeNode, expr core.IExprNode) *CastNode

func (*CastNode) AsExprNode

func (self *CastNode) AsExprNode() core.IExprNode

func (*CastNode) GetExpr

func (self *CastNode) GetExpr() core.IExprNode

func (CastNode) GetLocation

func (self CastNode) GetLocation() core.Location

func (*CastNode) GetOrigType

func (self *CastNode) GetOrigType() core.IType

func (*CastNode) GetType

func (self *CastNode) GetType() core.IType

func (*CastNode) GetTypeNode

func (self *CastNode) GetTypeNode() core.ITypeNode

func (*CastNode) GetTypeRef

func (self *CastNode) GetTypeRef() core.ITypeRef

func (*CastNode) IsAssignable

func (self *CastNode) IsAssignable() bool

func (*CastNode) IsCallable

func (self *CastNode) IsCallable() bool

func (*CastNode) IsConstant

func (self *CastNode) IsConstant() bool

func (*CastNode) IsEffectiveCast

func (self *CastNode) IsEffectiveCast() bool

func (*CastNode) IsLoadable

func (self *CastNode) IsLoadable() bool

func (*CastNode) IsLvalue

func (self *CastNode) IsLvalue() bool

func (*CastNode) IsParameter

func (self *CastNode) IsParameter() bool

func (*CastNode) IsPointer

func (self *CastNode) IsPointer() bool

func (*CastNode) SetType

func (self *CastNode) SetType(t core.IType)

func (CastNode) String

func (self CastNode) String() string

type CondExprNode

type CondExprNode struct {
	ClassName string
	Location  core.Location
	Cond      core.IExprNode
	ThenExpr  core.IExprNode
	ElseExpr  core.IExprNode
	Type      core.IType
}

CondExprNode

func NewCondExprNode

func NewCondExprNode(loc core.Location, cond core.IExprNode, thenExpr core.IExprNode, elseExpr core.IExprNode) *CondExprNode

func (*CondExprNode) AsExprNode

func (self *CondExprNode) AsExprNode() core.IExprNode

func (*CondExprNode) GetCond

func (self *CondExprNode) GetCond() core.IExprNode

func (*CondExprNode) GetElseExpr

func (self *CondExprNode) GetElseExpr() core.IExprNode

func (CondExprNode) GetLocation

func (self CondExprNode) GetLocation() core.Location

func (*CondExprNode) GetOrigType

func (self *CondExprNode) GetOrigType() core.IType

func (*CondExprNode) GetThenExpr

func (self *CondExprNode) GetThenExpr() core.IExprNode

func (*CondExprNode) GetType

func (self *CondExprNode) GetType() core.IType

func (*CondExprNode) IsAssignable

func (self *CondExprNode) IsAssignable() bool

func (*CondExprNode) IsCallable

func (self *CondExprNode) IsCallable() bool

func (*CondExprNode) IsConstant

func (self *CondExprNode) IsConstant() bool

func (*CondExprNode) IsLoadable

func (self *CondExprNode) IsLoadable() bool

func (*CondExprNode) IsLvalue

func (self *CondExprNode) IsLvalue() bool

func (*CondExprNode) IsParameter

func (self *CondExprNode) IsParameter() bool

func (*CondExprNode) IsPointer

func (self *CondExprNode) IsPointer() bool

func (*CondExprNode) SetElseExpr

func (self *CondExprNode) SetElseExpr(expr core.IExprNode)

func (*CondExprNode) SetThenExpr

func (self *CondExprNode) SetThenExpr(expr core.IExprNode)

func (*CondExprNode) SetType

func (self *CondExprNode) SetType(t core.IType)

func (CondExprNode) String

func (self CondExprNode) String() string

type ContinueNode

type ContinueNode struct {
	ClassName string
	Location  core.Location
}

ContinueNode

func NewContinueNode

func NewContinueNode(loc core.Location) *ContinueNode

func (*ContinueNode) AsStmtNode

func (self *ContinueNode) AsStmtNode() core.IStmtNode

func (ContinueNode) GetLocation

func (self ContinueNode) GetLocation() core.Location

func (ContinueNode) GetScope

func (self ContinueNode) GetScope() core.IScope

func (ContinueNode) String

func (self ContinueNode) String() string

type Declaration

type Declaration struct {
	ClassName  string
	Defvars    []*entity.DefinedVariable
	Vardecls   []*entity.UndefinedVariable
	Defuns     []*entity.DefinedFunction
	Funcdecls  []*entity.UndefinedFunction
	Constants  []*entity.Constant
	Defstructs []*StructNode
	Defunions  []*UnionNode
	Typedefs   []*TypedefNode
}

func AsDeclaration

func AsDeclaration(x core.INode) *Declaration

func NewDeclaration

func NewDeclaration(defvars []*entity.DefinedVariable, vardecls []*entity.UndefinedVariable, defuns []*entity.DefinedFunction, funcdecls []*entity.UndefinedFunction, constants []*entity.Constant, defstructs []*StructNode, defunions []*UnionNode, typedefs []*TypedefNode) *Declaration

func (*Declaration) AddConstant

func (self *Declaration) AddConstant(c *entity.Constant)

func (*Declaration) AddConstants

func (self *Declaration) AddConstants(cs []*entity.Constant)

func (*Declaration) AddDeclaration

func (self *Declaration) AddDeclaration(other *Declaration)

func (*Declaration) AddDefstruct

func (self *Declaration) AddDefstruct(s *StructNode)

func (*Declaration) AddDefstructs

func (self *Declaration) AddDefstructs(ss []*StructNode)

func (*Declaration) AddDefun

func (self *Declaration) AddDefun(f *entity.DefinedFunction)

func (*Declaration) AddDefunion

func (self *Declaration) AddDefunion(u *UnionNode)

func (*Declaration) AddDefunions

func (self *Declaration) AddDefunions(us []*UnionNode)

func (*Declaration) AddDefuns

func (self *Declaration) AddDefuns(fs []*entity.DefinedFunction)

func (*Declaration) AddDefvar

func (self *Declaration) AddDefvar(v *entity.DefinedVariable)

func (*Declaration) AddDefvars

func (self *Declaration) AddDefvars(vs []*entity.DefinedVariable)

func (*Declaration) AddFuncdecl

func (self *Declaration) AddFuncdecl(f *entity.UndefinedFunction)

func (*Declaration) AddFuncdecls

func (self *Declaration) AddFuncdecls(fs []*entity.UndefinedFunction)

func (*Declaration) AddTypedef

func (self *Declaration) AddTypedef(t *TypedefNode)

func (*Declaration) AddTypedefs

func (self *Declaration) AddTypedefs(ts []*TypedefNode)

func (*Declaration) AddVardecl

func (self *Declaration) AddVardecl(v *entity.UndefinedVariable)

func (*Declaration) AddVardecls

func (self *Declaration) AddVardecls(vs []*entity.UndefinedVariable)

func (*Declaration) GetConstants

func (self *Declaration) GetConstants() []*entity.Constant

func (*Declaration) GetDefstructs

func (self *Declaration) GetDefstructs() []*StructNode

func (*Declaration) GetDefunions

func (self *Declaration) GetDefunions() []*UnionNode

func (*Declaration) GetDefuns

func (self *Declaration) GetDefuns() []*entity.DefinedFunction

func (*Declaration) GetDefvars

func (self *Declaration) GetDefvars() []*entity.DefinedVariable

func (*Declaration) GetFuncdecls

func (self *Declaration) GetFuncdecls() []*entity.UndefinedFunction

func (Declaration) GetLocation

func (self Declaration) GetLocation() core.Location

func (*Declaration) GetTypedefs

func (self *Declaration) GetTypedefs() []*TypedefNode

func (*Declaration) GetVardecls

func (self *Declaration) GetVardecls() []*entity.UndefinedVariable

func (Declaration) String

func (self Declaration) String() string

type DereferenceNode

type DereferenceNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	Type      core.IType
}

DereferenceNode

func NewDereferenceNode

func NewDereferenceNode(loc core.Location, expr core.IExprNode) *DereferenceNode

func (*DereferenceNode) AsExprNode

func (self *DereferenceNode) AsExprNode() core.IExprNode

func (*DereferenceNode) GetExpr

func (self *DereferenceNode) GetExpr() core.IExprNode

func (DereferenceNode) GetLocation

func (self DereferenceNode) GetLocation() core.Location

func (*DereferenceNode) GetOrigType

func (self *DereferenceNode) GetOrigType() core.IType

func (*DereferenceNode) GetType

func (self *DereferenceNode) GetType() core.IType

func (*DereferenceNode) IsAssignable

func (self *DereferenceNode) IsAssignable() bool

func (*DereferenceNode) IsCallable

func (self *DereferenceNode) IsCallable() bool

func (*DereferenceNode) IsConstant

func (self *DereferenceNode) IsConstant() bool

func (*DereferenceNode) IsLoadable

func (self *DereferenceNode) IsLoadable() bool

func (*DereferenceNode) IsLvalue

func (self *DereferenceNode) IsLvalue() bool

func (*DereferenceNode) IsParameter

func (self *DereferenceNode) IsParameter() bool

func (*DereferenceNode) IsPointer

func (self *DereferenceNode) IsPointer() bool

func (*DereferenceNode) SetType

func (self *DereferenceNode) SetType(t core.IType)

func (DereferenceNode) String

func (self DereferenceNode) String() string

type DoWhileNode

type DoWhileNode struct {
	ClassName string
	Location  core.Location
	Body      core.IStmtNode
	Cond      core.IExprNode
}

DoWhileNode

func NewDoWhileNode

func NewDoWhileNode(loc core.Location, body core.IStmtNode, cond core.IExprNode) *DoWhileNode

func (*DoWhileNode) AsStmtNode

func (self *DoWhileNode) AsStmtNode() core.IStmtNode

func (*DoWhileNode) GetBody

func (self *DoWhileNode) GetBody() core.IStmtNode

func (*DoWhileNode) GetCond

func (self *DoWhileNode) GetCond() core.IExprNode

func (DoWhileNode) GetLocation

func (self DoWhileNode) GetLocation() core.Location

func (DoWhileNode) GetScope

func (self DoWhileNode) GetScope() core.IScope

func (DoWhileNode) String

func (self DoWhileNode) String() string

type ExprStmtNode

type ExprStmtNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
}

ExprStmtNode

func NewExprStmtNode

func NewExprStmtNode(loc core.Location, expr core.IExprNode) *ExprStmtNode

func (*ExprStmtNode) AsStmtNode

func (self *ExprStmtNode) AsStmtNode() core.IStmtNode

func (*ExprStmtNode) GetExpr

func (self *ExprStmtNode) GetExpr() core.IExprNode

func (ExprStmtNode) GetLocation

func (self ExprStmtNode) GetLocation() core.Location

func (ExprStmtNode) GetScope

func (self ExprStmtNode) GetScope() core.IScope

func (ExprStmtNode) String

func (self ExprStmtNode) String() string

type ForNode

type ForNode struct {
	ClassName string
	Location  core.Location
	Init      core.IExprNode
	Cond      core.IExprNode
	Incr      core.IExprNode
	Body      core.IStmtNode
}

ForNode

func NewForNode

func NewForNode(loc core.Location, init core.IExprNode, cond core.IExprNode, incr core.IExprNode, body core.IStmtNode) *ForNode

func (*ForNode) AsStmtNode

func (self *ForNode) AsStmtNode() core.IStmtNode

func (*ForNode) GetBody

func (self *ForNode) GetBody() core.IStmtNode

func (*ForNode) GetCond

func (self *ForNode) GetCond() core.IExprNode

func (*ForNode) GetIncr

func (self *ForNode) GetIncr() core.IExprNode

func (*ForNode) GetInit

func (self *ForNode) GetInit() core.IExprNode

func (ForNode) GetLocation

func (self ForNode) GetLocation() core.Location

func (ForNode) GetScope

func (self ForNode) GetScope() core.IScope

func (ForNode) HasCond

func (self ForNode) HasCond() bool

func (ForNode) HasIncr

func (self ForNode) HasIncr() bool

func (ForNode) HasInit

func (self ForNode) HasInit() bool

func (ForNode) String

func (self ForNode) String() string

type FuncallNode

type FuncallNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	Args      []core.IExprNode
}

FuncallNode

func NewFuncallNode

func NewFuncallNode(loc core.Location, expr core.IExprNode, args []core.IExprNode) *FuncallNode

func (*FuncallNode) AsExprNode

func (self *FuncallNode) AsExprNode() core.IExprNode

func (*FuncallNode) GetArg

func (self *FuncallNode) GetArg(i int) core.IExprNode

func (*FuncallNode) GetArgs

func (self *FuncallNode) GetArgs() []core.IExprNode

func (*FuncallNode) GetExpr

func (self *FuncallNode) GetExpr() core.IExprNode

func (*FuncallNode) GetFunctionType

func (self *FuncallNode) GetFunctionType() *typesys.FunctionType

func (FuncallNode) GetLocation

func (self FuncallNode) GetLocation() core.Location

func (*FuncallNode) GetOrigType

func (self *FuncallNode) GetOrigType() core.IType

func (*FuncallNode) GetType

func (self *FuncallNode) GetType() core.IType

func (*FuncallNode) IsAssignable

func (self *FuncallNode) IsAssignable() bool

func (*FuncallNode) IsCallable

func (self *FuncallNode) IsCallable() bool

func (*FuncallNode) IsConstant

func (self *FuncallNode) IsConstant() bool

func (*FuncallNode) IsLoadable

func (self *FuncallNode) IsLoadable() bool

func (*FuncallNode) IsLvalue

func (self *FuncallNode) IsLvalue() bool

func (*FuncallNode) IsParameter

func (self *FuncallNode) IsParameter() bool

func (*FuncallNode) IsPointer

func (self *FuncallNode) IsPointer() bool

func (*FuncallNode) NumArgs

func (self *FuncallNode) NumArgs() int

func (*FuncallNode) SetArgs

func (self *FuncallNode) SetArgs(args []core.IExprNode)

func (*FuncallNode) SetType

func (self *FuncallNode) SetType(t core.IType)

func (FuncallNode) String

func (self FuncallNode) String() string

type GotoNode

type GotoNode struct {
	ClassName string
	Location  core.Location
	Target    string
}

GotoNode

func NewGotoNode

func NewGotoNode(loc core.Location, target string) *GotoNode

func (*GotoNode) AsStmtNode

func (self *GotoNode) AsStmtNode() core.IStmtNode

func (GotoNode) GetLocation

func (self GotoNode) GetLocation() core.Location

func (GotoNode) GetScope

func (self GotoNode) GetScope() core.IScope

func (*GotoNode) GetTarget

func (self *GotoNode) GetTarget() string

func (GotoNode) String

func (self GotoNode) String() string

type INodeVisitor

type INodeVisitor interface {
	VisitStmtNode(core.IStmtNode) interface{}
	VisitExprNode(core.IExprNode) interface{}
	VisitTypeDefinition(core.ITypeDefinition) interface{}
}

type IfNode

type IfNode struct {
	ClassName string
	Location  core.Location
	Cond      core.IExprNode
	ThenBody  core.IStmtNode
	ElseBody  core.IStmtNode
}

IfNode

func NewIfNode

func NewIfNode(loc core.Location, cond core.IExprNode, thenBody core.IStmtNode, elseBody core.IStmtNode) *IfNode

func (*IfNode) AsStmtNode

func (self *IfNode) AsStmtNode() core.IStmtNode

func (*IfNode) GetCond

func (self *IfNode) GetCond() core.IExprNode

func (*IfNode) GetElseBody

func (self *IfNode) GetElseBody() core.IStmtNode

func (IfNode) GetLocation

func (self IfNode) GetLocation() core.Location

func (IfNode) GetScope

func (self IfNode) GetScope() core.IScope

func (*IfNode) GetThenBody

func (self *IfNode) GetThenBody() core.IStmtNode

func (*IfNode) HasElseBody

func (self *IfNode) HasElseBody() bool

func (IfNode) String

func (self IfNode) String() string

type IntegerLiteralNode

type IntegerLiteralNode struct {
	ClassName string
	Location  core.Location
	TypeNode  core.ITypeNode
	Value     int64
}

IntegerLiteralNode

func NewCharacterLiteralNode

func NewCharacterLiteralNode(loc core.Location, literal string) *IntegerLiteralNode

func NewIntegerLiteralNode

func NewIntegerLiteralNode(loc core.Location, literal string) *IntegerLiteralNode

func (*IntegerLiteralNode) AsExprNode

func (self *IntegerLiteralNode) AsExprNode() core.IExprNode

func (IntegerLiteralNode) GetLocation

func (self IntegerLiteralNode) GetLocation() core.Location

func (*IntegerLiteralNode) GetOrigType

func (self *IntegerLiteralNode) GetOrigType() core.IType

func (*IntegerLiteralNode) GetType

func (self *IntegerLiteralNode) GetType() core.IType

func (*IntegerLiteralNode) GetTypeNode

func (self *IntegerLiteralNode) GetTypeNode() core.ITypeNode

func (*IntegerLiteralNode) GetValue

func (self *IntegerLiteralNode) GetValue() int64

func (*IntegerLiteralNode) IsAssignable

func (self *IntegerLiteralNode) IsAssignable() bool

func (*IntegerLiteralNode) IsCallable

func (self *IntegerLiteralNode) IsCallable() bool

func (*IntegerLiteralNode) IsConstant

func (self *IntegerLiteralNode) IsConstant() bool

func (*IntegerLiteralNode) IsLoadable

func (self *IntegerLiteralNode) IsLoadable() bool

func (*IntegerLiteralNode) IsLvalue

func (self *IntegerLiteralNode) IsLvalue() bool

func (*IntegerLiteralNode) IsParameter

func (self *IntegerLiteralNode) IsParameter() bool

func (*IntegerLiteralNode) IsPointer

func (self *IntegerLiteralNode) IsPointer() bool

func (*IntegerLiteralNode) SetType

func (self *IntegerLiteralNode) SetType(t core.IType)

func (IntegerLiteralNode) String

func (self IntegerLiteralNode) String() string

type LabelNode

type LabelNode struct {
	ClassName string
	Location  core.Location
	Name      string
	Stmt      core.IStmtNode
}

LabelNode

func NewLabelNode

func NewLabelNode(loc core.Location, name string, stmt core.IStmtNode) *LabelNode

func (*LabelNode) AsStmtNode

func (self *LabelNode) AsStmtNode() core.IStmtNode

func (LabelNode) GetLocation

func (self LabelNode) GetLocation() core.Location

func (*LabelNode) GetName

func (self *LabelNode) GetName() string

func (LabelNode) GetScope

func (self LabelNode) GetScope() core.IScope

func (*LabelNode) GetStmt

func (self *LabelNode) GetStmt() core.IStmtNode

func (LabelNode) String

func (self LabelNode) String() string

type LogicalAndNode

type LogicalAndNode struct {
	ClassName string
	Location  core.Location
	Left      core.IExprNode
	Right     core.IExprNode
	Type      core.IType
}

LogicalAndNode

func NewLogicalAndNode

func NewLogicalAndNode(loc core.Location, left core.IExprNode, right core.IExprNode) *LogicalAndNode

func (*LogicalAndNode) AsExprNode

func (self *LogicalAndNode) AsExprNode() core.IExprNode

func (*LogicalAndNode) GetLeft

func (self *LogicalAndNode) GetLeft() core.IExprNode

func (LogicalAndNode) GetLocation

func (self LogicalAndNode) GetLocation() core.Location

func (*LogicalAndNode) GetOperator

func (self *LogicalAndNode) GetOperator() string

func (*LogicalAndNode) GetOrigType

func (self *LogicalAndNode) GetOrigType() core.IType

func (*LogicalAndNode) GetRight

func (self *LogicalAndNode) GetRight() core.IExprNode

func (*LogicalAndNode) GetType

func (self *LogicalAndNode) GetType() core.IType

func (*LogicalAndNode) IsAssignable

func (self *LogicalAndNode) IsAssignable() bool

func (*LogicalAndNode) IsCallable

func (self *LogicalAndNode) IsCallable() bool

func (*LogicalAndNode) IsConstant

func (self *LogicalAndNode) IsConstant() bool

func (*LogicalAndNode) IsLoadable

func (self *LogicalAndNode) IsLoadable() bool

func (*LogicalAndNode) IsLvalue

func (self *LogicalAndNode) IsLvalue() bool

func (*LogicalAndNode) IsParameter

func (self *LogicalAndNode) IsParameter() bool

func (*LogicalAndNode) IsPointer

func (self *LogicalAndNode) IsPointer() bool

func (*LogicalAndNode) SetLeft

func (self *LogicalAndNode) SetLeft(expr core.IExprNode)

func (*LogicalAndNode) SetRight

func (self *LogicalAndNode) SetRight(expr core.IExprNode)

func (*LogicalAndNode) SetType

func (self *LogicalAndNode) SetType(t core.IType)

func (LogicalAndNode) String

func (self LogicalAndNode) String() string

type LogicalOrNode

type LogicalOrNode struct {
	ClassName string
	Location  core.Location
	Left      core.IExprNode
	Right     core.IExprNode
	Type      core.IType
}

LogicalOrNode

func NewLogicalOrNode

func NewLogicalOrNode(loc core.Location, left core.IExprNode, right core.IExprNode) *LogicalOrNode

func (*LogicalOrNode) AsExprNode

func (self *LogicalOrNode) AsExprNode() core.IExprNode

func (*LogicalOrNode) GetLeft

func (self *LogicalOrNode) GetLeft() core.IExprNode

func (LogicalOrNode) GetLocation

func (self LogicalOrNode) GetLocation() core.Location

func (*LogicalOrNode) GetOperator

func (self *LogicalOrNode) GetOperator() string

func (*LogicalOrNode) GetOrigType

func (self *LogicalOrNode) GetOrigType() core.IType

func (*LogicalOrNode) GetRight

func (self *LogicalOrNode) GetRight() core.IExprNode

func (*LogicalOrNode) GetType

func (self *LogicalOrNode) GetType() core.IType

func (*LogicalOrNode) IsAssignable

func (self *LogicalOrNode) IsAssignable() bool

func (*LogicalOrNode) IsCallable

func (self *LogicalOrNode) IsCallable() bool

func (*LogicalOrNode) IsConstant

func (self *LogicalOrNode) IsConstant() bool

func (*LogicalOrNode) IsLoadable

func (self *LogicalOrNode) IsLoadable() bool

func (*LogicalOrNode) IsLvalue

func (self *LogicalOrNode) IsLvalue() bool

func (*LogicalOrNode) IsParameter

func (self *LogicalOrNode) IsParameter() bool

func (*LogicalOrNode) IsPointer

func (self *LogicalOrNode) IsPointer() bool

func (*LogicalOrNode) SetLeft

func (self *LogicalOrNode) SetLeft(expr core.IExprNode)

func (*LogicalOrNode) SetRight

func (self *LogicalOrNode) SetRight(expr core.IExprNode)

func (*LogicalOrNode) SetType

func (self *LogicalOrNode) SetType(t core.IType)

func (LogicalOrNode) String

func (self LogicalOrNode) String() string

type MemberNode

type MemberNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	Member    string
	Type      core.IType
}

MemberNode

func NewMemberNode

func NewMemberNode(loc core.Location, expr core.IExprNode, member string) *MemberNode

func (*MemberNode) AsExprNode

func (self *MemberNode) AsExprNode() core.IExprNode

func (*MemberNode) GetBaseType

func (self *MemberNode) GetBaseType() core.ICompositeType

func (*MemberNode) GetExpr

func (self *MemberNode) GetExpr() core.IExprNode

func (MemberNode) GetLocation

func (self MemberNode) GetLocation() core.Location

func (*MemberNode) GetMember

func (self *MemberNode) GetMember() string

func (*MemberNode) GetOffset

func (self *MemberNode) GetOffset() int

func (*MemberNode) GetOrigType

func (self *MemberNode) GetOrigType() core.IType

func (*MemberNode) GetType

func (self *MemberNode) GetType() core.IType

func (*MemberNode) IsAssignable

func (self *MemberNode) IsAssignable() bool

func (*MemberNode) IsCallable

func (self *MemberNode) IsCallable() bool

func (*MemberNode) IsConstant

func (self *MemberNode) IsConstant() bool

func (*MemberNode) IsLoadable

func (self *MemberNode) IsLoadable() bool

func (*MemberNode) IsLvalue

func (self *MemberNode) IsLvalue() bool

func (*MemberNode) IsParameter

func (self *MemberNode) IsParameter() bool

func (*MemberNode) IsPointer

func (self *MemberNode) IsPointer() bool

func (*MemberNode) SetType

func (self *MemberNode) SetType(t core.IType)

func (MemberNode) String

func (self MemberNode) String() string

type OpAssignNode

type OpAssignNode struct {
	ClassName string
	Location  core.Location
	Operator  string
	LHS       core.IExprNode
	RHS       core.IExprNode
}

OpAssignNode

func NewOpAssignNode

func NewOpAssignNode(loc core.Location, operator string, lhs core.IExprNode, rhs core.IExprNode) *OpAssignNode

func (*OpAssignNode) AsExprNode

func (self *OpAssignNode) AsExprNode() core.IExprNode

func (*OpAssignNode) GetLHS

func (self *OpAssignNode) GetLHS() core.IExprNode

func (OpAssignNode) GetLocation

func (self OpAssignNode) GetLocation() core.Location

func (*OpAssignNode) GetOperator

func (self *OpAssignNode) GetOperator() string

func (*OpAssignNode) GetOrigType

func (self *OpAssignNode) GetOrigType() core.IType

func (*OpAssignNode) GetRHS

func (self *OpAssignNode) GetRHS() core.IExprNode

func (*OpAssignNode) GetType

func (self *OpAssignNode) GetType() core.IType

func (*OpAssignNode) IsAssignable

func (self *OpAssignNode) IsAssignable() bool

func (*OpAssignNode) IsCallable

func (self *OpAssignNode) IsCallable() bool

func (*OpAssignNode) IsConstant

func (self *OpAssignNode) IsConstant() bool

func (*OpAssignNode) IsLoadable

func (self *OpAssignNode) IsLoadable() bool

func (*OpAssignNode) IsLvalue

func (self *OpAssignNode) IsLvalue() bool

func (*OpAssignNode) IsParameter

func (self *OpAssignNode) IsParameter() bool

func (*OpAssignNode) IsPointer

func (self *OpAssignNode) IsPointer() bool

func (*OpAssignNode) SetLHS

func (self *OpAssignNode) SetLHS(expr core.IExprNode)

func (*OpAssignNode) SetRHS

func (self *OpAssignNode) SetRHS(expr core.IExprNode)

func (*OpAssignNode) SetType

func (self *OpAssignNode) SetType(t core.IType)

func (OpAssignNode) String

func (self OpAssignNode) String() string

type PrefixOpNode

type PrefixOpNode struct {
	ClassName string
	Location  core.Location
	Operator  string
	Expr      core.IExprNode
	Amount    int
	Type      core.IType
}

PrefixOpNode

func NewPrefixOpNode

func NewPrefixOpNode(loc core.Location, operator string, expr core.IExprNode) *PrefixOpNode

func (*PrefixOpNode) AsExprNode

func (self *PrefixOpNode) AsExprNode() core.IExprNode

func (*PrefixOpNode) GetAmount

func (self *PrefixOpNode) GetAmount() int

func (*PrefixOpNode) GetExpr

func (self *PrefixOpNode) GetExpr() core.IExprNode

func (PrefixOpNode) GetLocation

func (self PrefixOpNode) GetLocation() core.Location

func (*PrefixOpNode) GetOpType

func (self *PrefixOpNode) GetOpType() core.IType

func (*PrefixOpNode) GetOperator

func (self *PrefixOpNode) GetOperator() string

func (*PrefixOpNode) GetOrigType

func (self *PrefixOpNode) GetOrigType() core.IType

func (*PrefixOpNode) GetType

func (self *PrefixOpNode) GetType() core.IType

func (*PrefixOpNode) IsAssignable

func (self *PrefixOpNode) IsAssignable() bool

func (*PrefixOpNode) IsCallable

func (self *PrefixOpNode) IsCallable() bool

func (*PrefixOpNode) IsConstant

func (self *PrefixOpNode) IsConstant() bool

func (*PrefixOpNode) IsLoadable

func (self *PrefixOpNode) IsLoadable() bool

func (*PrefixOpNode) IsLvalue

func (self *PrefixOpNode) IsLvalue() bool

func (*PrefixOpNode) IsParameter

func (self *PrefixOpNode) IsParameter() bool

func (*PrefixOpNode) IsPointer

func (self *PrefixOpNode) IsPointer() bool

func (*PrefixOpNode) SetAmount

func (self *PrefixOpNode) SetAmount(i int)

func (*PrefixOpNode) SetExpr

func (self *PrefixOpNode) SetExpr(expr core.IExprNode)

func (*PrefixOpNode) SetOpType

func (self *PrefixOpNode) SetOpType(t core.IType)

func (*PrefixOpNode) SetType

func (self *PrefixOpNode) SetType(t core.IType)

func (PrefixOpNode) String

func (self PrefixOpNode) String() string

type PtrMemberNode

type PtrMemberNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	Member    string
	Type      core.IType
}

PtrMemberNode

func NewPtrMemberNode

func NewPtrMemberNode(loc core.Location, expr core.IExprNode, member string) *PtrMemberNode

func (*PtrMemberNode) AsExprNode

func (self *PtrMemberNode) AsExprNode() core.IExprNode

func (*PtrMemberNode) GetDereferedCompositeType

func (self *PtrMemberNode) GetDereferedCompositeType() core.ICompositeType

func (*PtrMemberNode) GetDereferedType

func (self *PtrMemberNode) GetDereferedType() core.IType

func (*PtrMemberNode) GetExpr

func (self *PtrMemberNode) GetExpr() core.IExprNode

func (PtrMemberNode) GetLocation

func (self PtrMemberNode) GetLocation() core.Location

func (*PtrMemberNode) GetMember

func (self *PtrMemberNode) GetMember() string

func (*PtrMemberNode) GetOffset

func (self *PtrMemberNode) GetOffset() int

func (*PtrMemberNode) GetOrigType

func (self *PtrMemberNode) GetOrigType() core.IType

func (*PtrMemberNode) GetType

func (self *PtrMemberNode) GetType() core.IType

func (*PtrMemberNode) IsAssignable

func (self *PtrMemberNode) IsAssignable() bool

func (*PtrMemberNode) IsCallable

func (self *PtrMemberNode) IsCallable() bool

func (*PtrMemberNode) IsConstant

func (self *PtrMemberNode) IsConstant() bool

func (*PtrMemberNode) IsLoadable

func (self *PtrMemberNode) IsLoadable() bool

func (*PtrMemberNode) IsLvalue

func (self *PtrMemberNode) IsLvalue() bool

func (*PtrMemberNode) IsParameter

func (self *PtrMemberNode) IsParameter() bool

func (*PtrMemberNode) IsPointer

func (self *PtrMemberNode) IsPointer() bool

func (*PtrMemberNode) SetType

func (self *PtrMemberNode) SetType(t core.IType)

func (PtrMemberNode) String

func (self PtrMemberNode) String() string

type ReturnNode

type ReturnNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
}

ReturnNode

func NewReturnNode

func NewReturnNode(loc core.Location, expr core.IExprNode) *ReturnNode

func (*ReturnNode) AsStmtNode

func (self *ReturnNode) AsStmtNode() core.IStmtNode

func (*ReturnNode) GetExpr

func (self *ReturnNode) GetExpr() core.IExprNode

func (ReturnNode) GetLocation

func (self ReturnNode) GetLocation() core.Location

func (ReturnNode) GetScope

func (self ReturnNode) GetScope() core.IScope

func (ReturnNode) HasExpr

func (self ReturnNode) HasExpr() bool

func (*ReturnNode) SetExpr

func (self *ReturnNode) SetExpr(expr core.IExprNode)

func (ReturnNode) String

func (self ReturnNode) String() string

type SizeofExprNode

type SizeofExprNode struct {
	ClassName string
	Location  core.Location
	Expr      core.IExprNode
	TypeNode  core.ITypeNode
	Type      core.IType
}

SizeofExprNode

func NewSizeofExprNode

func NewSizeofExprNode(loc core.Location, expr core.IExprNode, t core.ITypeRef) *SizeofExprNode

func (*SizeofExprNode) AsExprNode

func (self *SizeofExprNode) AsExprNode() core.IExprNode

func (*SizeofExprNode) GetExpr

func (self *SizeofExprNode) GetExpr() core.IExprNode

func (SizeofExprNode) GetLocation

func (self SizeofExprNode) GetLocation() core.Location

func (*SizeofExprNode) GetOrigType

func (self *SizeofExprNode) GetOrigType() core.IType

func (*SizeofExprNode) GetType

func (self *SizeofExprNode) GetType() core.IType

func (*SizeofExprNode) GetTypeNode

func (self *SizeofExprNode) GetTypeNode() core.ITypeNode

func (*SizeofExprNode) GetTypeRef

func (self *SizeofExprNode) GetTypeRef() core.ITypeRef

func (*SizeofExprNode) IsAssignable

func (self *SizeofExprNode) IsAssignable() bool

func (*SizeofExprNode) IsCallable

func (self *SizeofExprNode) IsCallable() bool

func (*SizeofExprNode) IsConstant

func (self *SizeofExprNode) IsConstant() bool

func (*SizeofExprNode) IsLoadable

func (self *SizeofExprNode) IsLoadable() bool

func (*SizeofExprNode) IsLvalue

func (self *SizeofExprNode) IsLvalue() bool

func (*SizeofExprNode) IsParameter

func (self *SizeofExprNode) IsParameter() bool

func (*SizeofExprNode) IsPointer

func (self *SizeofExprNode) IsPointer() bool

func (*SizeofExprNode) SetType

func (self *SizeofExprNode) SetType(t core.IType)

func (SizeofExprNode) String

func (self SizeofExprNode) String() string

type SizeofTypeNode

type SizeofTypeNode struct {
	ClassName       string
	Location        core.Location
	TypeNode        core.ITypeNode
	OperandTypeNode core.ITypeNode
	Type            core.IType
}

SizeofTypeNode

func NewSizeofTypeNode

func NewSizeofTypeNode(loc core.Location, operand core.ITypeNode, ref core.ITypeRef) *SizeofTypeNode

func (*SizeofTypeNode) AsExprNode

func (self *SizeofTypeNode) AsExprNode() core.IExprNode

func (SizeofTypeNode) GetLocation

func (self SizeofTypeNode) GetLocation() core.Location

func (*SizeofTypeNode) GetOperandType

func (self *SizeofTypeNode) GetOperandType() core.IType

func (*SizeofTypeNode) GetOperandTypeNode

func (self *SizeofTypeNode) GetOperandTypeNode() core.ITypeNode

func (*SizeofTypeNode) GetOperandTypeRef

func (self *SizeofTypeNode) GetOperandTypeRef() core.ITypeRef

func (*SizeofTypeNode) GetOrigType

func (self *SizeofTypeNode) GetOrigType() core.IType

func (*SizeofTypeNode) GetType

func (self *SizeofTypeNode) GetType() core.IType

func (*SizeofTypeNode) GetTypeNode

func (self *SizeofTypeNode) GetTypeNode() core.ITypeNode

func (*SizeofTypeNode) GetTypeRef

func (self *SizeofTypeNode) GetTypeRef() core.ITypeRef

func (*SizeofTypeNode) IsAssignable

func (self *SizeofTypeNode) IsAssignable() bool

func (*SizeofTypeNode) IsCallable

func (self *SizeofTypeNode) IsCallable() bool

func (*SizeofTypeNode) IsConstant

func (self *SizeofTypeNode) IsConstant() bool

func (*SizeofTypeNode) IsLoadable

func (self *SizeofTypeNode) IsLoadable() bool

func (*SizeofTypeNode) IsLvalue

func (self *SizeofTypeNode) IsLvalue() bool

func (*SizeofTypeNode) IsParameter

func (self *SizeofTypeNode) IsParameter() bool

func (*SizeofTypeNode) IsPointer

func (self *SizeofTypeNode) IsPointer() bool

func (*SizeofTypeNode) SetType

func (self *SizeofTypeNode) SetType(t core.IType)

func (SizeofTypeNode) String

func (self SizeofTypeNode) String() string

type Slot

type Slot struct {
	ClassName string
	TypeNode  core.ITypeNode
	Name      string
	Offset    int
}

Slot

func NewSlot

func NewSlot(t core.ITypeNode, n string) *Slot

func (Slot) GetLocation

func (self Slot) GetLocation() core.Location

func (*Slot) GetName

func (self *Slot) GetName() string

func (*Slot) GetOffset

func (self *Slot) GetOffset() int

func (*Slot) GetType

func (self *Slot) GetType() core.IType

func (*Slot) GetTypeNode

func (self *Slot) GetTypeNode() core.ITypeNode

func (*Slot) GetTypeRef

func (self *Slot) GetTypeRef() core.ITypeRef

func (Slot) String

func (self Slot) String() string

type StringLiteralNode

type StringLiteralNode struct {
	ClassName string
	Location  core.Location
	TypeNode  core.ITypeNode
	Value     string
	// contains filtered or unexported fields
}

StringLiteralNode

func NewStringLiteralNode

func NewStringLiteralNode(loc core.Location, literal string) *StringLiteralNode

func (*StringLiteralNode) AsExprNode

func (self *StringLiteralNode) AsExprNode() core.IExprNode

func (*StringLiteralNode) GetEntry

func (self *StringLiteralNode) GetEntry() *entity.ConstantEntry

func (StringLiteralNode) GetLocation

func (self StringLiteralNode) GetLocation() core.Location

func (*StringLiteralNode) GetOrigType

func (self *StringLiteralNode) GetOrigType() core.IType

func (*StringLiteralNode) GetType

func (self *StringLiteralNode) GetType() core.IType

func (*StringLiteralNode) GetTypeNode

func (self *StringLiteralNode) GetTypeNode() core.ITypeNode

func (*StringLiteralNode) GetTypeRef

func (self *StringLiteralNode) GetTypeRef() core.ITypeRef

func (*StringLiteralNode) GetValue

func (self *StringLiteralNode) GetValue() string

func (*StringLiteralNode) IsAssignable

func (self *StringLiteralNode) IsAssignable() bool

func (*StringLiteralNode) IsCallable

func (self *StringLiteralNode) IsCallable() bool

func (*StringLiteralNode) IsConstant

func (self *StringLiteralNode) IsConstant() bool

func (*StringLiteralNode) IsLoadable

func (self *StringLiteralNode) IsLoadable() bool

func (*StringLiteralNode) IsLvalue

func (self *StringLiteralNode) IsLvalue() bool

func (*StringLiteralNode) IsParameter

func (self *StringLiteralNode) IsParameter() bool

func (*StringLiteralNode) IsPointer

func (self *StringLiteralNode) IsPointer() bool

func (*StringLiteralNode) SetEntry

func (self *StringLiteralNode) SetEntry(e *entity.ConstantEntry)

func (*StringLiteralNode) SetType

func (self *StringLiteralNode) SetType(t core.IType)

func (StringLiteralNode) String

func (self StringLiteralNode) String() string

type StructNode

type StructNode struct {
	ClassName string
	Location  core.Location
	TypeNode  core.ITypeNode
	Name      string
	Members   []core.ISlot
}

StructNode

func AsStructNode

func AsStructNode(x core.INode) *StructNode

func NewStructNode

func NewStructNode(loc core.Location, ref core.ITypeRef, name string, membs []core.ISlot) *StructNode

func NewStructNodes

func NewStructNodes(xs ...*StructNode) []*StructNode

func (*StructNode) DefiningType

func (self *StructNode) DefiningType() core.IType

func (StructNode) GetLocation

func (self StructNode) GetLocation() core.Location

func (*StructNode) GetMembers

func (self *StructNode) GetMembers() []core.ISlot

func (*StructNode) GetName

func (self *StructNode) GetName() string

func (*StructNode) GetTypeNode

func (self *StructNode) GetTypeNode() core.ITypeNode

func (*StructNode) GetTypeRef

func (self *StructNode) GetTypeRef() core.ITypeRef

func (*StructNode) IsCompositeType

func (self *StructNode) IsCompositeType() bool

func (*StructNode) IsTypeDefinition

func (self *StructNode) IsTypeDefinition() bool

func (StructNode) String

func (self StructNode) String() string

type SuffixOpNode

type SuffixOpNode struct {
	ClassName string
	Location  core.Location
	Operator  string
	Expr      core.IExprNode
	Amount    int
	Type      core.IType
}

SuffixOpNode

func NewSuffixOpNode

func NewSuffixOpNode(loc core.Location, operator string, expr core.IExprNode) *SuffixOpNode

func (*SuffixOpNode) AsExprNode

func (self *SuffixOpNode) AsExprNode() core.IExprNode

func (*SuffixOpNode) GetAmount

func (self *SuffixOpNode) GetAmount() int

func (*SuffixOpNode) GetExpr

func (self *SuffixOpNode) GetExpr() core.IExprNode

func (SuffixOpNode) GetLocation

func (self SuffixOpNode) GetLocation() core.Location

func (*SuffixOpNode) GetOpType

func (self *SuffixOpNode) GetOpType() core.IType

func (*SuffixOpNode) GetOperator

func (self *SuffixOpNode) GetOperator() string

func (*SuffixOpNode) GetOrigType

func (self *SuffixOpNode) GetOrigType() core.IType

func (*SuffixOpNode) GetType

func (self *SuffixOpNode) GetType() core.IType

func (*SuffixOpNode) IsAssignable

func (self *SuffixOpNode) IsAssignable() bool

func (*SuffixOpNode) IsCallable

func (self *SuffixOpNode) IsCallable() bool

func (*SuffixOpNode) IsConstant

func (self *SuffixOpNode) IsConstant() bool

func (*SuffixOpNode) IsLoadable

func (self *SuffixOpNode) IsLoadable() bool

func (*SuffixOpNode) IsLvalue

func (self *SuffixOpNode) IsLvalue() bool

func (*SuffixOpNode) IsParameter

func (self *SuffixOpNode) IsParameter() bool

func (*SuffixOpNode) IsPointer

func (self *SuffixOpNode) IsPointer() bool

func (*SuffixOpNode) SetAmount

func (self *SuffixOpNode) SetAmount(i int)

func (*SuffixOpNode) SetExpr

func (self *SuffixOpNode) SetExpr(expr core.IExprNode)

func (*SuffixOpNode) SetOpType

func (self *SuffixOpNode) SetOpType(t core.IType)

func (*SuffixOpNode) SetType

func (self *SuffixOpNode) SetType(t core.IType)

func (SuffixOpNode) String

func (self SuffixOpNode) String() string

type SwitchNode

type SwitchNode struct {
	ClassName string
	Location  core.Location
	Cond      core.IExprNode
	Cases     []core.IStmtNode
}

SwitchNode

func NewSwitchNode

func NewSwitchNode(loc core.Location, cond core.IExprNode, cases []core.IStmtNode) *SwitchNode

func (*SwitchNode) AsStmtNode

func (self *SwitchNode) AsStmtNode() core.IStmtNode

func (*SwitchNode) GetCases

func (self *SwitchNode) GetCases() []core.IStmtNode

func (*SwitchNode) GetCond

func (self *SwitchNode) GetCond() core.IExprNode

func (SwitchNode) GetLocation

func (self SwitchNode) GetLocation() core.Location

func (SwitchNode) GetScope

func (self SwitchNode) GetScope() core.IScope

func (SwitchNode) String

func (self SwitchNode) String() string

type TypeNode

type TypeNode struct {
	ClassName string
	Location  core.Location
	TypeRef   core.ITypeRef
	Type      core.IType
}

TypeNode

func NewTypeNode

func NewTypeNode(loc core.Location, ref core.ITypeRef) *TypeNode

func (*TypeNode) AsTypeNode

func (self *TypeNode) AsTypeNode() core.ITypeNode

func (TypeNode) GetLocation

func (self TypeNode) GetLocation() core.Location

func (*TypeNode) GetType

func (self *TypeNode) GetType() core.IType

func (*TypeNode) GetTypeRef

func (self *TypeNode) GetTypeRef() core.ITypeRef

func (*TypeNode) IsResolved

func (self *TypeNode) IsResolved() bool

func (*TypeNode) SetType

func (self *TypeNode) SetType(t core.IType)

func (TypeNode) String

func (self TypeNode) String() string

type TypedefNode

type TypedefNode struct {
	ClassName    string
	Location     core.Location
	TypeNode     core.ITypeNode
	RealTypeNode core.ITypeNode
	Name         string
}

TypedefNode

func AsTypedefNode

func AsTypedefNode(x core.INode) *TypedefNode

func NewTypedefNode

func NewTypedefNode(loc core.Location, real core.ITypeRef, name string) *TypedefNode

func NewTypedefNodes

func NewTypedefNodes(xs ...*TypedefNode) []*TypedefNode

func (*TypedefNode) DefiningType

func (self *TypedefNode) DefiningType() core.IType

func (TypedefNode) GetLocation

func (self TypedefNode) GetLocation() core.Location

func (*TypedefNode) GetName

func (self *TypedefNode) GetName() string

func (*TypedefNode) GetRealTypeNode

func (self *TypedefNode) GetRealTypeNode() core.ITypeNode

func (*TypedefNode) GetRealTypeRef

func (self *TypedefNode) GetRealTypeRef() core.ITypeRef

func (*TypedefNode) GetTypeNode

func (self *TypedefNode) GetTypeNode() core.ITypeNode

func (*TypedefNode) GetTypeRef

func (self *TypedefNode) GetTypeRef() core.ITypeRef

func (*TypedefNode) IsTypeDefinition

func (self *TypedefNode) IsTypeDefinition() bool

func (TypedefNode) String

func (self TypedefNode) String() string

type UnaryOpNode

type UnaryOpNode struct {
	ClassName string
	Location  core.Location
	Operator  string
	Expr      core.IExprNode
	Type      core.IType
}

UnaryOpNode

func NewUnaryOpNode

func NewUnaryOpNode(loc core.Location, operator string, expr core.IExprNode) *UnaryOpNode

func (*UnaryOpNode) AsExprNode

func (self *UnaryOpNode) AsExprNode() core.IExprNode

func (*UnaryOpNode) GetExpr

func (self *UnaryOpNode) GetExpr() core.IExprNode

func (UnaryOpNode) GetLocation

func (self UnaryOpNode) GetLocation() core.Location

func (*UnaryOpNode) GetOpType

func (self *UnaryOpNode) GetOpType() core.IType

func (*UnaryOpNode) GetOperator

func (self *UnaryOpNode) GetOperator() string

func (*UnaryOpNode) GetOrigType

func (self *UnaryOpNode) GetOrigType() core.IType

func (*UnaryOpNode) GetType

func (self *UnaryOpNode) GetType() core.IType

func (*UnaryOpNode) IsAssignable

func (self *UnaryOpNode) IsAssignable() bool

func (*UnaryOpNode) IsCallable

func (self *UnaryOpNode) IsCallable() bool

func (*UnaryOpNode) IsConstant

func (self *UnaryOpNode) IsConstant() bool

func (*UnaryOpNode) IsLoadable

func (self *UnaryOpNode) IsLoadable() bool

func (*UnaryOpNode) IsLvalue

func (self *UnaryOpNode) IsLvalue() bool

func (*UnaryOpNode) IsParameter

func (self *UnaryOpNode) IsParameter() bool

func (*UnaryOpNode) IsPointer

func (self *UnaryOpNode) IsPointer() bool

func (*UnaryOpNode) SetOpType

func (self *UnaryOpNode) SetOpType(t core.IType)

func (*UnaryOpNode) SetType

func (self *UnaryOpNode) SetType(t core.IType)

func (UnaryOpNode) String

func (self UnaryOpNode) String() string

type UnionNode

type UnionNode struct {
	ClassName string
	Location  core.Location
	TypeNode  core.ITypeNode
	Name      string
	Members   []core.ISlot
}

UnionNode

func AsUnionNode

func AsUnionNode(x core.INode) *UnionNode

func NewUnionNode

func NewUnionNode(loc core.Location, ref core.ITypeRef, name string, membs []core.ISlot) *UnionNode

func NewUnionNodes

func NewUnionNodes(xs ...*UnionNode) []*UnionNode

func (*UnionNode) DefiningType

func (self *UnionNode) DefiningType() core.IType

func (UnionNode) GetLocation

func (self UnionNode) GetLocation() core.Location

func (*UnionNode) GetMembers

func (self *UnionNode) GetMembers() []core.ISlot

func (*UnionNode) GetName

func (self *UnionNode) GetName() string

func (*UnionNode) GetTypeNode

func (self *UnionNode) GetTypeNode() core.ITypeNode

func (*UnionNode) GetTypeRef

func (self *UnionNode) GetTypeRef() core.ITypeRef

func (*UnionNode) IsCompositeType

func (self *UnionNode) IsCompositeType() bool

func (*UnionNode) IsTypeDefinition

func (self *UnionNode) IsTypeDefinition() bool

func (UnionNode) String

func (self UnionNode) String() string

type VariableNode

type VariableNode struct {
	ClassName string
	Location  core.Location
	Name      string
	Entity    core.IEntity
}

VariableNode

func NewVariableNode

func NewVariableNode(loc core.Location, name string) *VariableNode

func (*VariableNode) AsExprNode

func (self *VariableNode) AsExprNode() core.IExprNode

func (*VariableNode) GetEntity

func (self *VariableNode) GetEntity() core.IEntity

func (VariableNode) GetLocation

func (self VariableNode) GetLocation() core.Location

func (*VariableNode) GetName

func (self *VariableNode) GetName() string

func (*VariableNode) GetOrigType

func (self *VariableNode) GetOrigType() core.IType

func (*VariableNode) GetType

func (self *VariableNode) GetType() core.IType

func (*VariableNode) IsAssignable

func (self *VariableNode) IsAssignable() bool

func (*VariableNode) IsCallable

func (self *VariableNode) IsCallable() bool

func (*VariableNode) IsConstant

func (self *VariableNode) IsConstant() bool

func (*VariableNode) IsLoadable

func (self *VariableNode) IsLoadable() bool

func (*VariableNode) IsLvalue

func (self *VariableNode) IsLvalue() bool

func (*VariableNode) IsParameter

func (self *VariableNode) IsParameter() bool

func (*VariableNode) IsPointer

func (self *VariableNode) IsPointer() bool

func (*VariableNode) IsResolved

func (self *VariableNode) IsResolved() bool

func (*VariableNode) SetEntity

func (self *VariableNode) SetEntity(ent core.IEntity)

func (*VariableNode) SetType

func (self *VariableNode) SetType(t core.IType)

func (VariableNode) String

func (self VariableNode) String() string

type WhileNode

type WhileNode struct {
	ClassName string
	Location  core.Location
	Cond      core.IExprNode
	Body      core.IStmtNode
}

WhileNode

func NewWhileNode

func NewWhileNode(loc core.Location, cond core.IExprNode, body core.IStmtNode) *WhileNode

func (*WhileNode) AsStmtNode

func (self *WhileNode) AsStmtNode() core.IStmtNode

func (*WhileNode) GetBody

func (self *WhileNode) GetBody() core.IStmtNode

func (*WhileNode) GetCond

func (self *WhileNode) GetCond() core.IExprNode

func (WhileNode) GetLocation

func (self WhileNode) GetLocation() core.Location

func (WhileNode) GetScope

func (self WhileNode) GetScope() core.IScope

func (WhileNode) String

func (self WhileNode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL