Documentation
¶
Index ¶
- func Walk(n Node, f Visitor)
- type ArrayType
- type Assert
- type AstFile
- type Available
- type BadExpr
- type Binary
- type BinaryOp
- type BitAlignment
- type BlockTrait
- type BoolLiteral
- type BoolType
- type Break
- type Call
- type Cast
- type CharLiteral
- type Comment
- type CommentGroup
- type Cond
- type ConstantLevel
- type Continue
- type Endian
- type Enum
- type EnumMember
- type EnumType
- type ExplicitError
- type Expr
- type Field
- type FieldArgument
- type FieldArgumentMapping
- type FloatType
- type Follow
- type Format
- type Function
- type FunctionType
- type GenerateMapFile
- type GenericType
- type Ident
- type IdentType
- type IdentUsage
- type Identity
- type If
- type ImplicitYield
- type Import
- type IndentBlock
- type Index
- type IntLiteral
- type IntLiteralType
- type IntType
- type IoMethod
- type IoOperation
- type JsonAst
- type LineMap
- type Literal
- type Loc
- type Loop
- type Match
- type MatchBranch
- type Member
- type MemberAccess
- type MetaType
- type Metadata
- type Node
- type NodeType
- type OptionalType
- type OrCond
- type OrderType
- type Paren
- type Pos
- type Program
- type Range
- type RangeType
- type RawNode
- type RawScope
- type RegexLiteral
- type RegexLiteralType
- func (n *RegexLiteralType) GetBitAlignment() BitAlignment
- func (n *RegexLiteralType) GetBitSize() *uint64
- func (n *RegexLiteralType) GetIsExplicit() bool
- func (n *RegexLiteralType) GetLoc() Loc
- func (n *RegexLiteralType) GetNodeType() NodeType
- func (n *RegexLiteralType) GetNonDynamicAllocation() bool
- type Return
- type Scope
- type ScopedStatement
- type SpecialLiteral
- type SpecialLiteralKind
- type SpecifyOrder
- type SrcError
- type SrcErrorEntry
- type State
- type Stmt
- type StrLiteral
- type StrLiteralType
- type StructType
- type StructUnionType
- type TmpVar
- type Token
- type TokenFile
- type TokenTag
- type Type
- type TypeLiteral
- type Unary
- type UnaryOp
- type UnionCandidate
- type UnionType
- type VisitFn
- type Visitor
- type VoidType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayType ¶
type ArrayType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 EndLoc Loc ElementType Type Length Expr LengthValue *uint64 IsBytes bool }
func (*ArrayType) GetBitAlignment ¶
func (n *ArrayType) GetBitAlignment() BitAlignment
func (*ArrayType) GetBitSize ¶
func (*ArrayType) GetIsExplicit ¶
func (*ArrayType) GetNodeType ¶
func (*ArrayType) GetNonDynamicAllocation ¶
type Assert ¶
func (*Assert) GetNodeType ¶
type Available ¶
type Available struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Base *Call Target Expr }
func (*Available) GetConstantLevel ¶
func (n *Available) GetConstantLevel() ConstantLevel
func (*Available) GetExprType ¶
func (*Available) GetNodeType ¶
type BadExpr ¶
type BadExpr struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Content string BadExpr Expr }
func (*BadExpr) GetConstantLevel ¶
func (n *BadExpr) GetConstantLevel() ConstantLevel
func (*BadExpr) GetExprType ¶
func (*BadExpr) GetNodeType ¶
type Binary ¶
type Binary struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Op BinaryOp Left Expr Right Expr }
func (*Binary) GetConstantLevel ¶
func (n *Binary) GetConstantLevel() ConstantLevel
func (*Binary) GetExprType ¶
func (*Binary) GetNodeType ¶
type BinaryOp ¶
type BinaryOp int
const ( BinaryOpMul BinaryOp = 0 BinaryOpDiv BinaryOp = 1 BinaryOpMod BinaryOp = 2 BinaryOpLeftArithmeticShift BinaryOp = 3 BinaryOpRightArithmeticShift BinaryOp = 4 BinaryOpLeftLogicalShift BinaryOp = 5 BinaryOpRightLogicalShift BinaryOp = 6 BinaryOpBitAnd BinaryOp = 7 BinaryOpAdd BinaryOp = 8 BinaryOpSub BinaryOp = 9 BinaryOpBitOr BinaryOp = 10 BinaryOpBitXor BinaryOp = 11 BinaryOpEqual BinaryOp = 12 BinaryOpNotEqual BinaryOp = 13 BinaryOpLess BinaryOp = 14 BinaryOpLessOrEq BinaryOp = 15 BinaryOpGrater BinaryOp = 16 BinaryOpGraterOrEq BinaryOp = 17 BinaryOpLogicalAnd BinaryOp = 18 BinaryOpLogicalOr BinaryOp = 19 BinaryOpCondOp1 BinaryOp = 20 BinaryOpCondOp2 BinaryOp = 21 BinaryOpRangeExclusive BinaryOp = 22 BinaryOpRangeInclusive BinaryOp = 23 BinaryOpAssign BinaryOp = 24 BinaryOpDefineAssign BinaryOp = 25 BinaryOpConstAssign BinaryOp = 26 BinaryOpAddAssign BinaryOp = 27 BinaryOpSubAssign BinaryOp = 28 BinaryOpMulAssign BinaryOp = 29 BinaryOpDivAssign BinaryOp = 30 BinaryOpModAssign BinaryOp = 31 BinaryOpLeftLogicalShiftAssign BinaryOp = 32 BinaryOpRightLogicalShiftAssign BinaryOp = 33 BinaryOpLeftArithmeticShiftAssign BinaryOp = 34 BinaryOpRightArithmeticShiftAssign BinaryOp = 35 BinaryOpBitAndAssign BinaryOp = 36 BinaryOpBitOrAssign BinaryOp = 37 BinaryOpBitXorAssign BinaryOp = 38 BinaryOpComma BinaryOp = 39 BinaryOpInAssign BinaryOp = 40 BinaryOpAppendAssign BinaryOp = 41 )
func (*BinaryOp) UnmarshalJSON ¶
type BitAlignment ¶
type BitAlignment int
const ( BitAlignmentByteAligned BitAlignment = 0 BitAlignmentBit1 BitAlignment = 1 BitAlignmentBit2 BitAlignment = 2 BitAlignmentBit3 BitAlignment = 3 BitAlignmentBit4 BitAlignment = 4 BitAlignmentBit5 BitAlignment = 5 BitAlignmentBit6 BitAlignment = 6 BitAlignmentBit7 BitAlignment = 7 BitAlignmentNotTarget BitAlignment = 8 BitAlignmentNotDecidable BitAlignment = 9 )
func (BitAlignment) String ¶
func (n BitAlignment) String() string
func (*BitAlignment) UnmarshalJSON ¶
func (n *BitAlignment) UnmarshalJSON(data []byte) error
type BlockTrait ¶
type BlockTrait int
const ( BlockTraitNone BlockTrait = 0 BlockTraitFixedPrimitive BlockTrait = 1 BlockTraitFixedFloat BlockTrait = 2 BlockTraitFixedArray BlockTrait = 4 BlockTraitVariableArray BlockTrait = 8 BlockTraitStruct BlockTrait = 16 BlockTraitConditional BlockTrait = 32 BlockTraitStaticPeek BlockTrait = 64 BlockTraitBitField BlockTrait = 128 BlockTraitReadState BlockTrait = 256 BlockTraitWriteState BlockTrait = 512 BlockTraitTerminalPattern BlockTrait = 1024 BlockTraitBitStream BlockTrait = 2048 BlockTraitDynamicOrder BlockTrait = 4096 BlockTraitFullInput BlockTrait = 8192 BlockTraitBackwardInput BlockTrait = 16384 BlockTraitMagicValue BlockTrait = 32768 BlockTraitAssertion BlockTrait = 65536 BlockTraitExplicitError BlockTrait = 131072 BlockTraitProcedural BlockTrait = 262144 BlockTraitForLoop BlockTrait = 524288 BlockTraitLocalVariable BlockTrait = 1048576 BlockTraitDescriptionOnly BlockTrait = 2097152 BlockTraitUncommonSize BlockTrait = 4194304 BlockTraitControlFlowChange BlockTrait = 8388608 )
func (BlockTrait) String ¶
func (n BlockTrait) String() string
func (*BlockTrait) UnmarshalJSON ¶
func (n *BlockTrait) UnmarshalJSON(data []byte) error
type BoolLiteral ¶
type BoolLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Value bool }
func (*BoolLiteral) GetConstantLevel ¶
func (n *BoolLiteral) GetConstantLevel() ConstantLevel
func (*BoolLiteral) GetExprType ¶
func (n *BoolLiteral) GetExprType() Type
func (*BoolLiteral) GetLoc ¶
func (n *BoolLiteral) GetLoc() Loc
func (*BoolLiteral) GetNodeType ¶
func (n *BoolLiteral) GetNodeType() NodeType
type BoolType ¶
type BoolType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 }
func (*BoolType) GetBitAlignment ¶
func (n *BoolType) GetBitAlignment() BitAlignment
func (*BoolType) GetBitSize ¶
func (*BoolType) GetIsExplicit ¶
func (*BoolType) GetNodeType ¶
func (*BoolType) GetNonDynamicAllocation ¶
type Break ¶
func (*Break) GetNodeType ¶
type Call ¶
type Call struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Callee Expr RawArguments Expr Arguments []Expr EndLoc Loc }
func (*Call) GetConstantLevel ¶
func (n *Call) GetConstantLevel() ConstantLevel
func (*Call) GetExprType ¶
func (*Call) GetNodeType ¶
type Cast ¶
type Cast struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Base *Call Arguments []Expr }
func (*Cast) GetConstantLevel ¶
func (n *Cast) GetConstantLevel() ConstantLevel
func (*Cast) GetExprType ¶
func (*Cast) GetNodeType ¶
type CharLiteral ¶
type CharLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Value string Code uint64 }
func (*CharLiteral) GetConstantLevel ¶
func (n *CharLiteral) GetConstantLevel() ConstantLevel
func (*CharLiteral) GetExprType ¶
func (n *CharLiteral) GetExprType() Type
func (*CharLiteral) GetLoc ¶
func (n *CharLiteral) GetLoc() Loc
func (*CharLiteral) GetNodeType ¶
func (n *CharLiteral) GetNodeType() NodeType
type Comment ¶
func (*Comment) GetNodeType ¶
type CommentGroup ¶
func (*CommentGroup) GetLoc ¶
func (n *CommentGroup) GetLoc() Loc
func (*CommentGroup) GetNodeType ¶
func (n *CommentGroup) GetNodeType() NodeType
type Cond ¶
type Cond struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Cond Expr Then Expr ElsLoc Loc Els Expr }
func (*Cond) GetConstantLevel ¶
func (n *Cond) GetConstantLevel() ConstantLevel
func (*Cond) GetExprType ¶
func (*Cond) GetNodeType ¶
type ConstantLevel ¶
type ConstantLevel int
const ( ConstantLevelUnknown ConstantLevel = 0 ConstantLevelConstant ConstantLevel = 1 ConstantLevelImmutableVariable ConstantLevel = 2 ConstantLevelVariable ConstantLevel = 3 )
func (ConstantLevel) String ¶
func (n ConstantLevel) String() string
func (*ConstantLevel) UnmarshalJSON ¶
func (n *ConstantLevel) UnmarshalJSON(data []byte) error
type Continue ¶
func (*Continue) GetNodeType ¶
type Enum ¶
type Enum struct { Loc Loc Belong Member BelongStruct *StructType Ident *Ident Scope *Scope ColonLoc Loc BaseType Type Members []*EnumMember EnumType *EnumType }
func (*Enum) GetBelongStruct ¶
func (n *Enum) GetBelongStruct() *StructType
func (*Enum) GetNodeType ¶
type EnumMember ¶
type EnumMember struct { Loc Loc Belong Member BelongStruct *StructType Ident *Ident RawExpr Expr Value Expr StrLiteral *StrLiteral }
func (*EnumMember) GetBelong ¶
func (n *EnumMember) GetBelong() Member
func (*EnumMember) GetBelongStruct ¶
func (n *EnumMember) GetBelongStruct() *StructType
func (*EnumMember) GetIdent ¶
func (n *EnumMember) GetIdent() *Ident
func (*EnumMember) GetLoc ¶
func (n *EnumMember) GetLoc() Loc
func (*EnumMember) GetNodeType ¶
func (n *EnumMember) GetNodeType() NodeType
type EnumType ¶
type EnumType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Base *Enum }
func (*EnumType) GetBitAlignment ¶
func (n *EnumType) GetBitAlignment() BitAlignment
func (*EnumType) GetBitSize ¶
func (*EnumType) GetIsExplicit ¶
func (*EnumType) GetNodeType ¶
func (*EnumType) GetNonDynamicAllocation ¶
type ExplicitError ¶
type ExplicitError struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Base *Call Message *StrLiteral }
func (*ExplicitError) GetConstantLevel ¶
func (n *ExplicitError) GetConstantLevel() ConstantLevel
func (*ExplicitError) GetExprType ¶
func (n *ExplicitError) GetExprType() Type
func (*ExplicitError) GetLoc ¶
func (n *ExplicitError) GetLoc() Loc
func (*ExplicitError) GetNodeType ¶
func (n *ExplicitError) GetNodeType() NodeType
type Expr ¶
type Expr interface { Node GetExprType() Type GetConstantLevel() ConstantLevel // contains filtered or unexported methods }
type Field ¶
type Field struct { Loc Loc Belong Member BelongStruct *StructType Ident *Ident ColonLoc Loc IsStateVariable bool FieldType Type Arguments *FieldArgument OffsetBit *uint64 OffsetRecent uint64 TailOffsetBit *uint64 TailOffsetRecent uint64 BitAlignment BitAlignment EventualBitAlignment BitAlignment Follow Follow EventualFollow Follow Next *Field }
func (*Field) GetBelongStruct ¶
func (n *Field) GetBelongStruct() *StructType
func (*Field) GetNodeType ¶
type FieldArgument ¶
type FieldArgument struct { Loc Loc RawArguments Expr EndLoc Loc CollectedArguments []Expr Arguments []Expr Assigns []*Binary Alignment Expr AlignmentValue *uint64 SubByteLength Expr SubByteBegin Expr Peek Expr PeekValue *uint64 TypeMap *TypeLiteral Metadata []*Metadata ArgumentMapping FieldArgumentMapping }
func (*FieldArgument) GetLoc ¶
func (n *FieldArgument) GetLoc() Loc
func (*FieldArgument) GetNodeType ¶
func (n *FieldArgument) GetNodeType() NodeType
type FieldArgumentMapping ¶
type FieldArgumentMapping int
const ( FieldArgumentMappingNone FieldArgumentMapping = 0 FieldArgumentMappingDirect FieldArgumentMapping = 1 FieldArgumentMappingRepeat FieldArgumentMapping = 2 FieldArgumentMappingSomeCandidate FieldArgumentMapping = 4 )
func (FieldArgumentMapping) String ¶
func (n FieldArgumentMapping) String() string
func (*FieldArgumentMapping) UnmarshalJSON ¶
func (n *FieldArgumentMapping) UnmarshalJSON(data []byte) error
type FloatType ¶
type FloatType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Endian Endian IsCommonSupported bool }
func (*FloatType) GetBitAlignment ¶
func (n *FloatType) GetBitAlignment() BitAlignment
func (*FloatType) GetBitSize ¶
func (*FloatType) GetIsExplicit ¶
func (*FloatType) GetNodeType ¶
func (*FloatType) GetNonDynamicAllocation ¶
type Format ¶
type Format struct { Loc Loc Belong Member BelongStruct *StructType Ident *Ident Body *IndentBlock EncodeFn *Function DecodeFn *Function CastFns []*Function Depends []*IdentType StateVariables []*Field }
func (*Format) GetBelongStruct ¶
func (n *Format) GetBelongStruct() *StructType
func (*Format) GetNodeType ¶
type Function ¶
type Function struct { Loc Loc Belong Member BelongStruct *StructType Ident *Ident Parameters []*Field ReturnType Type Body *IndentBlock FuncType *FunctionType IsCast bool }
func (*Function) GetBelongStruct ¶
func (n *Function) GetBelongStruct() *StructType
func (*Function) GetNodeType ¶
type FunctionType ¶
type FunctionType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 ReturnType Type Parameters []Type }
func (*FunctionType) GetBitAlignment ¶
func (n *FunctionType) GetBitAlignment() BitAlignment
func (*FunctionType) GetBitSize ¶
func (n *FunctionType) GetBitSize() *uint64
func (*FunctionType) GetIsExplicit ¶
func (n *FunctionType) GetIsExplicit() bool
func (*FunctionType) GetLoc ¶
func (n *FunctionType) GetLoc() Loc
func (*FunctionType) GetNodeType ¶
func (n *FunctionType) GetNodeType() NodeType
func (*FunctionType) GetNonDynamicAllocation ¶
func (n *FunctionType) GetNonDynamicAllocation() bool
type GenerateMapFile ¶
type GenericType ¶
type GenericType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Belong Member }
func (*GenericType) GetBitAlignment ¶
func (n *GenericType) GetBitAlignment() BitAlignment
func (*GenericType) GetBitSize ¶
func (n *GenericType) GetBitSize() *uint64
func (*GenericType) GetIsExplicit ¶
func (n *GenericType) GetIsExplicit() bool
func (*GenericType) GetLoc ¶
func (n *GenericType) GetLoc() Loc
func (*GenericType) GetNodeType ¶
func (n *GenericType) GetNodeType() NodeType
func (*GenericType) GetNonDynamicAllocation ¶
func (n *GenericType) GetNonDynamicAllocation() bool
type Ident ¶
type Ident struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Ident string Usage IdentUsage Base Node Scope *Scope }
func (*Ident) GetConstantLevel ¶
func (n *Ident) GetConstantLevel() ConstantLevel
func (*Ident) GetExprType ¶
func (*Ident) GetNodeType ¶
type IdentType ¶
type IdentType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 ImportRef *MemberAccess Ident *Ident Base Type }
func (*IdentType) GetBitAlignment ¶
func (n *IdentType) GetBitAlignment() BitAlignment
func (*IdentType) GetBitSize ¶
func (*IdentType) GetIsExplicit ¶
func (*IdentType) GetNodeType ¶
func (*IdentType) GetNonDynamicAllocation ¶
type IdentUsage ¶
type IdentUsage int
const ( IdentUsageUnknown IdentUsage = 0 IdentUsageBadIdent IdentUsage = 1 IdentUsageReference IdentUsage = 2 IdentUsageDefineVariable IdentUsage = 3 IdentUsageDefineConst IdentUsage = 4 IdentUsageDefineField IdentUsage = 5 IdentUsageDefineFormat IdentUsage = 6 IdentUsageDefineState IdentUsage = 7 IdentUsageDefineEnum IdentUsage = 8 IdentUsageDefineEnumMember IdentUsage = 9 IdentUsageDefineFn IdentUsage = 10 IdentUsageDefineCastFn IdentUsage = 11 IdentUsageDefineArg IdentUsage = 12 IdentUsageReferenceType IdentUsage = 13 IdentUsageReferenceMember IdentUsage = 14 IdentUsageReferenceMemberType IdentUsage = 15 IdentUsageMaybeType IdentUsage = 16 IdentUsageReferenceBuiltinFn IdentUsage = 17 )
func (IdentUsage) String ¶
func (n IdentUsage) String() string
func (*IdentUsage) UnmarshalJSON ¶
func (n *IdentUsage) UnmarshalJSON(data []byte) error
type Identity ¶
type Identity struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Expr Expr }
func (*Identity) GetConstantLevel ¶
func (n *Identity) GetConstantLevel() ConstantLevel
func (*Identity) GetExprType ¶
func (*Identity) GetNodeType ¶
type If ¶
type If struct { Loc Loc ExprType Type ConstantLevel ConstantLevel StructUnionType *StructUnionType CondScope *Scope Cond *Identity Then *IndentBlock Els Node }
func (*If) GetConstantLevel ¶
func (n *If) GetConstantLevel() ConstantLevel
func (*If) GetExprType ¶
func (*If) GetNodeType ¶
type ImplicitYield ¶
func (*ImplicitYield) GetLoc ¶
func (n *ImplicitYield) GetLoc() Loc
func (*ImplicitYield) GetNodeType ¶
func (n *ImplicitYield) GetNodeType() NodeType
type Import ¶
type Import struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Path string Base *Call ImportDesc *Program }
func (*Import) GetConstantLevel ¶
func (n *Import) GetConstantLevel() ConstantLevel
func (*Import) GetExprType ¶
func (*Import) GetNodeType ¶
type IndentBlock ¶
type IndentBlock struct { Loc Loc StructType *StructType Elements []Node Scope *Scope Metadata []*Metadata BlockTraits BlockTrait }
func (*IndentBlock) GetLoc ¶
func (n *IndentBlock) GetLoc() Loc
func (*IndentBlock) GetNodeType ¶
func (n *IndentBlock) GetNodeType() NodeType
type Index ¶
type Index struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Expr Expr Index Expr EndLoc Loc }
func (*Index) GetConstantLevel ¶
func (n *Index) GetConstantLevel() ConstantLevel
func (*Index) GetExprType ¶
func (*Index) GetNodeType ¶
type IntLiteral ¶
type IntLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Value string }
func (*IntLiteral) GetConstantLevel ¶
func (n *IntLiteral) GetConstantLevel() ConstantLevel
func (*IntLiteral) GetExprType ¶
func (n *IntLiteral) GetExprType() Type
func (*IntLiteral) GetLoc ¶
func (n *IntLiteral) GetLoc() Loc
func (*IntLiteral) GetNodeType ¶
func (n *IntLiteral) GetNodeType() NodeType
type IntLiteralType ¶
type IntLiteralType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Base *IntLiteral }
func (*IntLiteralType) GetBitAlignment ¶
func (n *IntLiteralType) GetBitAlignment() BitAlignment
func (*IntLiteralType) GetBitSize ¶
func (n *IntLiteralType) GetBitSize() *uint64
func (*IntLiteralType) GetIsExplicit ¶
func (n *IntLiteralType) GetIsExplicit() bool
func (*IntLiteralType) GetLoc ¶
func (n *IntLiteralType) GetLoc() Loc
func (*IntLiteralType) GetNodeType ¶
func (n *IntLiteralType) GetNodeType() NodeType
func (*IntLiteralType) GetNonDynamicAllocation ¶
func (n *IntLiteralType) GetNonDynamicAllocation() bool
type IntType ¶
type IntType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Endian Endian IsSigned bool IsCommonSupported bool }
func (*IntType) GetBitAlignment ¶
func (n *IntType) GetBitAlignment() BitAlignment
func (*IntType) GetBitSize ¶
func (*IntType) GetIsExplicit ¶
func (*IntType) GetNodeType ¶
func (*IntType) GetNonDynamicAllocation ¶
type IoMethod ¶
type IoMethod int
const ( IoMethodUnspec IoMethod = 0 IoMethodOutputPut IoMethod = 1 IoMethodInputPeek IoMethod = 2 IoMethodInputGet IoMethod = 3 IoMethodInputBackward IoMethod = 4 IoMethodInputOffset IoMethod = 5 IoMethodInputBitOffset IoMethod = 6 IoMethodInputRemain IoMethod = 7 IoMethodInputSubrange IoMethod = 8 IoMethodConfigEndianLittle IoMethod = 9 IoMethodConfigEndianBig IoMethod = 10 IoMethodConfigEndianNative IoMethod = 11 IoMethodConfigBitOrderLsb IoMethod = 12 IoMethodConfigBitOrderMsb IoMethod = 13 )
func (*IoMethod) UnmarshalJSON ¶
type IoOperation ¶
type IoOperation struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Base Expr Method IoMethod Arguments []Expr }
func (*IoOperation) GetConstantLevel ¶
func (n *IoOperation) GetConstantLevel() ConstantLevel
func (*IoOperation) GetExprType ¶
func (n *IoOperation) GetExprType() Type
func (*IoOperation) GetLoc ¶
func (n *IoOperation) GetLoc() Loc
func (*IoOperation) GetNodeType ¶
func (n *IoOperation) GetNodeType() NodeType
type Loop ¶
func (*Loop) GetNodeType ¶
type Match ¶
type Match struct { Loc Loc ExprType Type ConstantLevel ConstantLevel StructUnionType *StructUnionType CondScope *Scope Cond *Identity Branch []*MatchBranch TrialMatch bool }
func (*Match) GetConstantLevel ¶
func (n *Match) GetConstantLevel() ConstantLevel
func (*Match) GetExprType ¶
func (*Match) GetNodeType ¶
type MatchBranch ¶
func (*MatchBranch) GetLoc ¶
func (n *MatchBranch) GetLoc() Loc
func (*MatchBranch) GetNodeType ¶
func (n *MatchBranch) GetNodeType() NodeType
type Member ¶
type Member interface { Stmt GetBelong() Member GetBelongStruct() *StructType GetIdent() *Ident // contains filtered or unexported methods }
type MemberAccess ¶
type MemberAccess struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Target Expr Member *Ident Base *Ident }
func (*MemberAccess) GetConstantLevel ¶
func (n *MemberAccess) GetConstantLevel() ConstantLevel
func (*MemberAccess) GetExprType ¶
func (n *MemberAccess) GetExprType() Type
func (*MemberAccess) GetLoc ¶
func (n *MemberAccess) GetLoc() Loc
func (*MemberAccess) GetNodeType ¶
func (n *MemberAccess) GetNodeType() NodeType
type MetaType ¶
type MetaType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 }
func (*MetaType) GetBitAlignment ¶
func (n *MetaType) GetBitAlignment() BitAlignment
func (*MetaType) GetBitSize ¶
func (*MetaType) GetIsExplicit ¶
func (*MetaType) GetNodeType ¶
func (*MetaType) GetNonDynamicAllocation ¶
type Metadata ¶
func (*Metadata) GetNodeType ¶
type NodeType ¶
type NodeType int
const ( NodeTypeProgram NodeType = 1 NodeTypeComment NodeType = 2 NodeTypeCommentGroup NodeType = 3 NodeTypeFieldArgument NodeType = 4 NodeTypeExpr NodeType = 65536 NodeTypeBinary NodeType = 65537 NodeTypeUnary NodeType = 65538 NodeTypeCond NodeType = 65539 NodeTypeIdent NodeType = 65540 NodeTypeCall NodeType = 65541 NodeTypeIf NodeType = 65542 NodeTypeMemberAccess NodeType = 65543 NodeTypeParen NodeType = 65544 NodeTypeIndex NodeType = 65545 NodeTypeMatch NodeType = 65546 NodeTypeRange NodeType = 65547 NodeTypeIdentity NodeType = 65548 NodeTypeTmpVar NodeType = 65549 NodeTypeImport NodeType = 65550 NodeTypeCast NodeType = 65551 NodeTypeAvailable NodeType = 65552 NodeTypeSpecifyOrder NodeType = 65553 NodeTypeExplicitError NodeType = 65554 NodeTypeIoOperation NodeType = 65555 NodeTypeOrCond NodeType = 65556 NodeTypeBadExpr NodeType = 65557 NodeTypeStmt NodeType = 131072 NodeTypeLoop NodeType = 131073 NodeTypeIndentBlock NodeType = 131074 NodeTypeScopedStatement NodeType = 131075 NodeTypeMatchBranch NodeType = 131076 NodeTypeUnionCandidate NodeType = 131077 NodeTypeReturn NodeType = 131078 NodeTypeBreak NodeType = 131079 NodeTypeContinue NodeType = 131080 NodeTypeAssert NodeType = 131081 NodeTypeImplicitYield NodeType = 131082 NodeTypeMetadata NodeType = 131083 NodeTypeType NodeType = 262144 NodeTypeIntType NodeType = 262145 NodeTypeFloatType NodeType = 262146 NodeTypeIdentType NodeType = 262147 NodeTypeIntLiteralType NodeType = 262148 NodeTypeStrLiteralType NodeType = 262149 NodeTypeRegexLiteralType NodeType = 262150 NodeTypeVoidType NodeType = 262151 NodeTypeBoolType NodeType = 262152 NodeTypeArrayType NodeType = 262153 NodeTypeFunctionType NodeType = 262154 NodeTypeStructType NodeType = 262155 NodeTypeStructUnionType NodeType = 262156 NodeTypeUnionType NodeType = 262157 NodeTypeRangeType NodeType = 262158 NodeTypeEnumType NodeType = 262159 NodeTypeMetaType NodeType = 262160 NodeTypeOptionalType NodeType = 262161 NodeTypeGenericType NodeType = 262162 NodeTypeLiteral NodeType = 2162688 NodeTypeIntLiteral NodeType = 2162689 NodeTypeBoolLiteral NodeType = 2162690 NodeTypeStrLiteral NodeType = 2162691 NodeTypeRegexLiteral NodeType = 2162692 NodeTypeCharLiteral NodeType = 2162693 NodeTypeTypeLiteral NodeType = 2162694 NodeTypeSpecialLiteral NodeType = 2162695 NodeTypeMember NodeType = 2228224 NodeTypeField NodeType = 2228225 NodeTypeFormat NodeType = 2228226 NodeTypeState NodeType = 2228227 NodeTypeEnum NodeType = 2228228 NodeTypeEnumMember NodeType = 2228229 NodeTypeFunction NodeType = 2228230 )
func (*NodeType) UnmarshalJSON ¶
type OptionalType ¶
type OptionalType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 BaseType Type }
func (*OptionalType) GetBitAlignment ¶
func (n *OptionalType) GetBitAlignment() BitAlignment
func (*OptionalType) GetBitSize ¶
func (n *OptionalType) GetBitSize() *uint64
func (*OptionalType) GetIsExplicit ¶
func (n *OptionalType) GetIsExplicit() bool
func (*OptionalType) GetLoc ¶
func (n *OptionalType) GetLoc() Loc
func (*OptionalType) GetNodeType ¶
func (n *OptionalType) GetNodeType() NodeType
func (*OptionalType) GetNonDynamicAllocation ¶
func (n *OptionalType) GetNonDynamicAllocation() bool
type OrCond ¶
type OrCond struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Base *Binary Conds []Expr }
func (*OrCond) GetConstantLevel ¶
func (n *OrCond) GetConstantLevel() ConstantLevel
func (*OrCond) GetExprType ¶
func (*OrCond) GetNodeType ¶
type Paren ¶
type Paren struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Expr Expr EndLoc Loc }
func (*Paren) GetConstantLevel ¶
func (n *Paren) GetConstantLevel() ConstantLevel
func (*Paren) GetExprType ¶
func (*Paren) GetNodeType ¶
type Program ¶
type Program struct { Loc Loc StructType *StructType Elements []Node GlobalScope *Scope Metadata []*Metadata Endian *SpecifyOrder }
func (*Program) GetNodeType ¶
type Range ¶
type Range struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Op BinaryOp Start Expr End Expr }
func (*Range) GetConstantLevel ¶
func (n *Range) GetConstantLevel() ConstantLevel
func (*Range) GetExprType ¶
func (*Range) GetNodeType ¶
type RangeType ¶
type RangeType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 BaseType Type Range *Range }
func (*RangeType) GetBitAlignment ¶
func (n *RangeType) GetBitAlignment() BitAlignment
func (*RangeType) GetBitSize ¶
func (*RangeType) GetIsExplicit ¶
func (*RangeType) GetNodeType ¶
func (*RangeType) GetNonDynamicAllocation ¶
type RawNode ¶
type RawNode struct { NodeType NodeType `json:"node_type"` Loc Loc `json:"loc"` Body json.RawMessage `json:"body"` }
type RegexLiteral ¶
type RegexLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Value string }
func (*RegexLiteral) GetConstantLevel ¶
func (n *RegexLiteral) GetConstantLevel() ConstantLevel
func (*RegexLiteral) GetExprType ¶
func (n *RegexLiteral) GetExprType() Type
func (*RegexLiteral) GetLoc ¶
func (n *RegexLiteral) GetLoc() Loc
func (*RegexLiteral) GetNodeType ¶
func (n *RegexLiteral) GetNodeType() NodeType
type RegexLiteralType ¶
type RegexLiteralType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Base *RegexLiteral StrongRef *RegexLiteral }
func (*RegexLiteralType) GetBitAlignment ¶
func (n *RegexLiteralType) GetBitAlignment() BitAlignment
func (*RegexLiteralType) GetBitSize ¶
func (n *RegexLiteralType) GetBitSize() *uint64
func (*RegexLiteralType) GetIsExplicit ¶
func (n *RegexLiteralType) GetIsExplicit() bool
func (*RegexLiteralType) GetLoc ¶
func (n *RegexLiteralType) GetLoc() Loc
func (*RegexLiteralType) GetNodeType ¶
func (n *RegexLiteralType) GetNodeType() NodeType
func (*RegexLiteralType) GetNonDynamicAllocation ¶
func (n *RegexLiteralType) GetNonDynamicAllocation() bool
type Return ¶
func (*Return) GetNodeType ¶
type ScopedStatement ¶
type ScopedStatement struct { Loc Loc StructType *StructType Statement Node Scope *Scope }
func (*ScopedStatement) GetLoc ¶
func (n *ScopedStatement) GetLoc() Loc
func (*ScopedStatement) GetNodeType ¶
func (n *ScopedStatement) GetNodeType() NodeType
type SpecialLiteral ¶
type SpecialLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Kind SpecialLiteralKind }
func (*SpecialLiteral) GetConstantLevel ¶
func (n *SpecialLiteral) GetConstantLevel() ConstantLevel
func (*SpecialLiteral) GetExprType ¶
func (n *SpecialLiteral) GetExprType() Type
func (*SpecialLiteral) GetLoc ¶
func (n *SpecialLiteral) GetLoc() Loc
func (*SpecialLiteral) GetNodeType ¶
func (n *SpecialLiteral) GetNodeType() NodeType
type SpecialLiteralKind ¶
type SpecialLiteralKind int
const ( SpecialLiteralKindInput SpecialLiteralKind = 0 SpecialLiteralKindOutput SpecialLiteralKind = 1 SpecialLiteralKindConfig SpecialLiteralKind = 2 )
func (SpecialLiteralKind) String ¶
func (n SpecialLiteralKind) String() string
func (*SpecialLiteralKind) UnmarshalJSON ¶
func (n *SpecialLiteralKind) UnmarshalJSON(data []byte) error
type SpecifyOrder ¶
type SpecifyOrder struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Base *Binary OrderType OrderType Order Expr OrderValue *uint64 }
func (*SpecifyOrder) GetConstantLevel ¶
func (n *SpecifyOrder) GetConstantLevel() ConstantLevel
func (*SpecifyOrder) GetExprType ¶
func (n *SpecifyOrder) GetExprType() Type
func (*SpecifyOrder) GetLoc ¶
func (n *SpecifyOrder) GetLoc() Loc
func (*SpecifyOrder) GetNodeType ¶
func (n *SpecifyOrder) GetNodeType() NodeType
type SrcError ¶
type SrcError struct {
Errs []SrcErrorEntry `json:"errs"`
}
type SrcErrorEntry ¶
type State ¶
type State struct { Loc Loc Belong Member BelongStruct *StructType Ident *Ident Body *IndentBlock }
func (*State) GetBelongStruct ¶
func (n *State) GetBelongStruct() *StructType
func (*State) GetNodeType ¶
type StrLiteral ¶
type StrLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Value string BinaryValue string Length uint64 }
func (*StrLiteral) GetConstantLevel ¶
func (n *StrLiteral) GetConstantLevel() ConstantLevel
func (*StrLiteral) GetExprType ¶
func (n *StrLiteral) GetExprType() Type
func (*StrLiteral) GetLoc ¶
func (n *StrLiteral) GetLoc() Loc
func (*StrLiteral) GetNodeType ¶
func (n *StrLiteral) GetNodeType() NodeType
type StrLiteralType ¶
type StrLiteralType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Base *StrLiteral StrongRef *StrLiteral }
func (*StrLiteralType) GetBitAlignment ¶
func (n *StrLiteralType) GetBitAlignment() BitAlignment
func (*StrLiteralType) GetBitSize ¶
func (n *StrLiteralType) GetBitSize() *uint64
func (*StrLiteralType) GetIsExplicit ¶
func (n *StrLiteralType) GetIsExplicit() bool
func (*StrLiteralType) GetLoc ¶
func (n *StrLiteralType) GetLoc() Loc
func (*StrLiteralType) GetNodeType ¶
func (n *StrLiteralType) GetNodeType() NodeType
func (*StrLiteralType) GetNonDynamicAllocation ¶
func (n *StrLiteralType) GetNonDynamicAllocation() bool
type StructType ¶
type StructType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Fields []Member Base Node Recursive bool FixedHeaderSize uint64 FixedTailSize uint64 TypeMap *TypeLiteral }
func (*StructType) GetBitAlignment ¶
func (n *StructType) GetBitAlignment() BitAlignment
func (*StructType) GetBitSize ¶
func (n *StructType) GetBitSize() *uint64
func (*StructType) GetIsExplicit ¶
func (n *StructType) GetIsExplicit() bool
func (*StructType) GetLoc ¶
func (n *StructType) GetLoc() Loc
func (*StructType) GetNodeType ¶
func (n *StructType) GetNodeType() NodeType
func (*StructType) GetNonDynamicAllocation ¶
func (n *StructType) GetNonDynamicAllocation() bool
type StructUnionType ¶
type StructUnionType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Cond *Identity Conds []Expr Structs []*StructType Base Expr UnionFields []*Field Exhaustive bool }
func (*StructUnionType) GetBitAlignment ¶
func (n *StructUnionType) GetBitAlignment() BitAlignment
func (*StructUnionType) GetBitSize ¶
func (n *StructUnionType) GetBitSize() *uint64
func (*StructUnionType) GetIsExplicit ¶
func (n *StructUnionType) GetIsExplicit() bool
func (*StructUnionType) GetLoc ¶
func (n *StructUnionType) GetLoc() Loc
func (*StructUnionType) GetNodeType ¶
func (n *StructUnionType) GetNodeType() NodeType
func (*StructUnionType) GetNonDynamicAllocation ¶
func (n *StructUnionType) GetNonDynamicAllocation() bool
type TmpVar ¶
type TmpVar struct { Loc Loc ExprType Type ConstantLevel ConstantLevel TmpVar uint64 }
func (*TmpVar) GetConstantLevel ¶
func (n *TmpVar) GetConstantLevel() ConstantLevel
func (*TmpVar) GetExprType ¶
func (*TmpVar) GetNodeType ¶
type TokenTag ¶
type TokenTag int
const ( TokenTagIndent TokenTag = 0 TokenTagSpace TokenTag = 1 TokenTagLine TokenTag = 2 TokenTagPunct TokenTag = 3 TokenTagIntLiteral TokenTag = 4 TokenTagBoolLiteral TokenTag = 5 TokenTagStrLiteral TokenTag = 6 TokenTagRegexLiteral TokenTag = 7 TokenTagCharLiteral TokenTag = 8 TokenTagKeyword TokenTag = 9 TokenTagIdent TokenTag = 10 TokenTagComment TokenTag = 11 TokenTagError TokenTag = 12 TokenTagUnknown TokenTag = 13 )
func (*TokenTag) UnmarshalJSON ¶
type Type ¶
type Type interface { Node GetIsExplicit() bool GetNonDynamicAllocation() bool GetBitAlignment() BitAlignment GetBitSize() *uint64 // contains filtered or unexported methods }
type TypeLiteral ¶
type TypeLiteral struct { Loc Loc ExprType Type ConstantLevel ConstantLevel TypeLiteral Type EndLoc Loc }
func (*TypeLiteral) GetConstantLevel ¶
func (n *TypeLiteral) GetConstantLevel() ConstantLevel
func (*TypeLiteral) GetExprType ¶
func (n *TypeLiteral) GetExprType() Type
func (*TypeLiteral) GetLoc ¶
func (n *TypeLiteral) GetLoc() Loc
func (*TypeLiteral) GetNodeType ¶
func (n *TypeLiteral) GetNodeType() NodeType
type Unary ¶
type Unary struct { Loc Loc ExprType Type ConstantLevel ConstantLevel Op UnaryOp Expr Expr }
func (*Unary) GetConstantLevel ¶
func (n *Unary) GetConstantLevel() ConstantLevel
func (*Unary) GetExprType ¶
func (*Unary) GetNodeType ¶
type UnionCandidate ¶
func (*UnionCandidate) GetLoc ¶
func (n *UnionCandidate) GetLoc() Loc
func (*UnionCandidate) GetNodeType ¶
func (n *UnionCandidate) GetNodeType() NodeType
type UnionType ¶
type UnionType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 Cond Expr Candidates []*UnionCandidate BaseType *StructUnionType CommonType Type MemberCandidates []*Field }
func (*UnionType) GetBitAlignment ¶
func (n *UnionType) GetBitAlignment() BitAlignment
func (*UnionType) GetBitSize ¶
func (*UnionType) GetIsExplicit ¶
func (*UnionType) GetNodeType ¶
func (*UnionType) GetNonDynamicAllocation ¶
type VoidType ¶
type VoidType struct { Loc Loc IsExplicit bool NonDynamicAllocation bool BitAlignment BitAlignment BitSize *uint64 }
func (*VoidType) GetBitAlignment ¶
func (n *VoidType) GetBitAlignment() BitAlignment
func (*VoidType) GetBitSize ¶
func (*VoidType) GetIsExplicit ¶
func (*VoidType) GetNodeType ¶
func (*VoidType) GetNonDynamicAllocation ¶
Click to show internal directories.
Click to hide internal directories.