Documentation
¶
Overview ¶
Package ast parses the clang AST output into AST structures.
Index ¶
- Constants
- Variables
- func Atos(node Node) string
- func FixPositions(nodes []Node)
- func GetTypeIfExist(node Node) (Type *string, ok bool)
- func TypesTree(node Node) (str string)
- type AccessSpecDecl
- type Address
- type AlignedAttr
- type AllocAlignAttr
- type AllocSizeAttr
- type AlwaysInlineAttr
- type AnnotateAttr
- type ArrayFiller
- type ArraySubscriptExpr
- type AsmLabelAttr
- type AttributedType
- type AvailabilityAttr
- type BinaryConditionalOperator
- type BinaryOperator
- type BlockCommandComment
- type BreakStmt
- type BuiltinAttr
- type BuiltinType
- type C11NoReturnAttr
- type C4goErrorNode
- type CStyleCastExpr
- type CXXConstructExpr
- type CXXConstructorDecl
- type CXXMemberCallExpr
- type CXXMethodDecl
- type CXXRecord
- type CXXRecordDecl
- type CXXThisExpr
- type CallExpr
- type CaseStmt
- type CharacterLiteral
- type CharacterLiteralError
- type CompoundAssignOperator
- type CompoundLiteralExpr
- type CompoundStmt
- type ConditionalOperator
- type ConstAttr
- type ConstantArrayType
- type ConstantExpr
- type ContinueStmt
- type DecayedType
- type DeclRefExpr
- type DeclStmt
- type DefaultStmt
- type DeprecatedAttr
- type DisableTailCallsAttr
- type DoStmt
- type ElaboratedType
- type EmptyDecl
- type EnableIfAttr
- type Enum
- type EnumConstantDecl
- type EnumDecl
- type EnumType
- type Field
- type FieldDecl
- type FloatingLiteral
- type FloatingLiteralError
- type ForStmt
- type FormatArgAttr
- type FormatAttr
- type FullComment
- type FunctionDecl
- type FunctionNoProtoType
- type FunctionProtoType
- type GCCAsmStmt
- type GenericSelectionExpr
- type GotoStmt
- type HTMLEndTagComment
- type HTMLStartTagComment
- type IfStmt
- type ImplicitCastExpr
- type ImplicitValueInitExpr
- type IncompleteArrayType
- type IndirectFieldDecl
- type InitListExpr
- type InlineCommandComment
- type IntegerLiteral
- type LabelStmt
- type LinkageSpecDecl
- type MallocAttr
- type MaxFieldAlignmentAttr
- type MemberExpr
- type ModeAttr
- type NoAliasAttr
- type NoInlineAttr
- type NoThrowAttr
- type Node
- type NonNullAttr
- type NotTailCalledAttr
- type OffsetOfExpr
- type OpaqueValueExpr
- type OverloadableAttr
- type PackedAttr
- type ParagraphComment
- type ParamCommandComment
- type ParenExpr
- type ParenType
- type ParmVarDecl
- type PointerType
- type Position
- type PredefinedExpr
- type PureAttr
- type QualType
- type Record
- type RecordDecl
- type RecordType
- type RestrictAttr
- type ReturnStmt
- type ReturnsTwiceAttr
- type SentinelAttr
- type StaticAssertDecl
- type StmtExpr
- type StringLiteral
- type SwitchStmt
- type TextComment
- type TranslationUnitDecl
- type TransparentUnionAttr
- type Typedef
- type TypedefDecl
- type TypedefType
- type UnaryExprOrTypeTraitExpr
- type UnaryOperator
- type UnusedAttr
- type UsedAttr
- type VAArgExpr
- type VarDecl
- type VerbatimBlockComment
- type VerbatimBlockLineComment
- type VerbatimLineComment
- type VisibilityAttr
- type WarnUnusedResultAttr
- type WeakAttr
- type WhileStmt
Constants ¶
const ImplicitCastExprArrayToPointerDecay = "ArrayToPointerDecay"
ImplicitCastExprArrayToPointerDecay - constant
Variables ¶
var CStyleCastExprNullToPointer = "NullToPointer"
CStyleCastExprNullToPointer - string of kind NullToPointer
var CStyleCastExprToVoid = "ToVoid"
CStyleCastExprToVoid - string of kind ToVoid
var FunctionDeclRefExpr = "Function"
FunctionDeclRefExpr - value of DeclRefExpr.For for function
var PositionBuiltIn = "<built-in>"
PositionBuiltIn - default value for fix position
Functions ¶
func GetTypeIfExist ¶
GetTypeIfExist return string inside field Type of struct
Types ¶
type AccessSpecDecl ¶
type AccessSpecDecl struct { Addr Address Pos Position Position2 string Name string ChildNodes []Node }
AccessSpecDecl
func (*AccessSpecDecl) AddChild ¶
func (n *AccessSpecDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AccessSpecDecl) Address ¶
func (n *AccessSpecDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AccessSpecDecl) Children ¶
func (n *AccessSpecDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AccessSpecDecl) Position ¶
func (n *AccessSpecDecl) Position() Position
Position returns the position in the original source code.
type Address ¶
type Address uint64
Address contains the memory address (originally outputted as a hexadecimal string) from the clang AST. The address are not predictable between run and are only useful for identifying nodes in a single AST.
The Address is used like a primary key when storing the tree as a flat structure.
func ParseAddress ¶
ParseAddress returns the integer representation of the hexadecimal address (like 0x7f8a1d8ccfd0). If the address cannot be parsed, 0 is returned.
type AlignedAttr ¶
AlignedAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*AlignedAttr) AddChild ¶
func (n *AlignedAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AlignedAttr) Address ¶
func (n *AlignedAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AlignedAttr) Children ¶
func (n *AlignedAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AlignedAttr) Position ¶
func (n *AlignedAttr) Position() Position
Position returns the position in the original source code.
type AllocAlignAttr ¶
AllocAlignAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*AllocAlignAttr) AddChild ¶
func (n *AllocAlignAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AllocAlignAttr) Address ¶
func (n *AllocAlignAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AllocAlignAttr) Children ¶
func (n *AllocAlignAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AllocAlignAttr) Position ¶
func (n *AllocAlignAttr) Position() Position
Position returns the position in the original source code.
type AllocSizeAttr ¶
type AllocSizeAttr struct { Addr Address Pos Position IsInherited bool A int B int ChildNodes []Node }
AllocSizeAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*AllocSizeAttr) AddChild ¶
func (n *AllocSizeAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AllocSizeAttr) Address ¶
func (n *AllocSizeAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AllocSizeAttr) Children ¶
func (n *AllocSizeAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AllocSizeAttr) Position ¶
func (n *AllocSizeAttr) Position() Position
Position returns the position in the original source code.
type AlwaysInlineAttr ¶
AlwaysInlineAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*AlwaysInlineAttr) AddChild ¶
func (n *AlwaysInlineAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AlwaysInlineAttr) Address ¶
func (n *AlwaysInlineAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AlwaysInlineAttr) Children ¶
func (n *AlwaysInlineAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AlwaysInlineAttr) Position ¶
func (n *AlwaysInlineAttr) Position() Position
Position returns the position in the original source code.
type AnnotateAttr ¶
AnnotateAttr
func (*AnnotateAttr) AddChild ¶
func (n *AnnotateAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AnnotateAttr) Address ¶
func (n *AnnotateAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AnnotateAttr) Children ¶
func (n *AnnotateAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AnnotateAttr) Position ¶
func (n *AnnotateAttr) Position() Position
Position returns the position in the original source code.
type ArrayFiller ¶
type ArrayFiller struct {
ChildNodes []Node
}
ArrayFiller is type of array filler
func (*ArrayFiller) AddChild ¶
func (n *ArrayFiller) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ArrayFiller) Address ¶
func (n *ArrayFiller) Address() Address
Address returns the numeric address of the node. For an ArrayFilter this will always be zero. See the documentation for the Address type for more information.
func (*ArrayFiller) Children ¶
func (n *ArrayFiller) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ArrayFiller) Position ¶
func (n *ArrayFiller) Position() Position
Position returns the position in the original source code.
type ArraySubscriptExpr ¶
type ArraySubscriptExpr struct { Addr Address Pos Position Type string Type2 string IsLvalue bool ChildNodes []Node }
ArraySubscriptExpr is expression.
func (*ArraySubscriptExpr) AddChild ¶
func (n *ArraySubscriptExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ArraySubscriptExpr) Address ¶
func (n *ArraySubscriptExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ArraySubscriptExpr) Children ¶
func (n *ArraySubscriptExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ArraySubscriptExpr) Position ¶
func (n *ArraySubscriptExpr) Position() Position
Position returns the position in the original source code.
type AsmLabelAttr ¶
type AsmLabelAttr struct { Addr Address Pos Position IsInherited bool IsLiteralLabel bool FunctionName string ChildNodes []Node }
AsmLabelAttr is a type of attribute for assembler label
func (*AsmLabelAttr) AddChild ¶
func (n *AsmLabelAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AsmLabelAttr) Address ¶
func (n *AsmLabelAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AsmLabelAttr) Children ¶
func (n *AsmLabelAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AsmLabelAttr) Position ¶
func (n *AsmLabelAttr) Position() Position
Position returns the position in the original source code.
type AttributedType ¶
AttributedType is an attribute type
func (*AttributedType) AddChild ¶
func (n *AttributedType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AttributedType) Address ¶
func (n *AttributedType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AttributedType) Children ¶
func (n *AttributedType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AttributedType) Position ¶
func (n *AttributedType) Position() Position
Position returns the position in the original source code.
type AvailabilityAttr ¶
type AvailabilityAttr struct { Addr Address Pos Position OS string Version string Unknown1 float64 Unknown2 int Message1 string Message2 string Message3 string IsInherited bool ChildNodes []Node }
AvailabilityAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*AvailabilityAttr) AddChild ¶
func (n *AvailabilityAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*AvailabilityAttr) Address ¶
func (n *AvailabilityAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*AvailabilityAttr) Children ¶
func (n *AvailabilityAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*AvailabilityAttr) Position ¶
func (n *AvailabilityAttr) Position() Position
Position returns the position in the original source code.
type BinaryConditionalOperator ¶
BinaryConditionalOperator is type of binary operator
func (*BinaryConditionalOperator) AddChild ¶
func (n *BinaryConditionalOperator) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*BinaryConditionalOperator) Address ¶
func (n *BinaryConditionalOperator) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*BinaryConditionalOperator) Children ¶
func (n *BinaryConditionalOperator) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*BinaryConditionalOperator) Position ¶
func (n *BinaryConditionalOperator) Position() Position
Position returns the position in the original source code.
type BinaryOperator ¶
type BinaryOperator struct { Addr Address Pos Position Type string Type2 string IsLvalue bool Operator string ChildNodes []Node }
BinaryOperator is type of binary operator
func (*BinaryOperator) AddChild ¶
func (n *BinaryOperator) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*BinaryOperator) Address ¶
func (n *BinaryOperator) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*BinaryOperator) Children ¶
func (n *BinaryOperator) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*BinaryOperator) Position ¶
func (n *BinaryOperator) Position() Position
Position returns the position in the original source code.
type BlockCommandComment ¶
BlockCommandComment is a type of comment
func (*BlockCommandComment) AddChild ¶
func (n *BlockCommandComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*BlockCommandComment) Address ¶
func (n *BlockCommandComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*BlockCommandComment) Children ¶
func (n *BlockCommandComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*BlockCommandComment) Position ¶
func (n *BlockCommandComment) Position() Position
Position returns the position in the original source code.
type BreakStmt ¶
BreakStmt is node represent 'break'
func (*BreakStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*BreakStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type BuiltinAttr ¶
type BuiltinAttr struct { Addr Address Pos Position IsImplicit bool IsInherited bool Name string IsAligned bool ChildNodes []Node }
BuiltinAttr is a type of attribute ...
func (*BuiltinAttr) AddChild ¶
func (n *BuiltinAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*BuiltinAttr) Address ¶
func (n *BuiltinAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*BuiltinAttr) Children ¶
func (n *BuiltinAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*BuiltinAttr) Position ¶
func (n *BuiltinAttr) Position() Position
Position returns the position in the original source code.
type BuiltinType ¶
BuiltinType is builtin type
func (*BuiltinType) AddChild ¶
func (n *BuiltinType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*BuiltinType) Address ¶
func (n *BuiltinType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*BuiltinType) Children ¶
func (n *BuiltinType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*BuiltinType) Position ¶
func (n *BuiltinType) Position() Position
Position returns the position in the original source code.
type C11NoReturnAttr ¶
C11NoReturnAttr is a type of attribute that is optionally attached to a function with return type void.
func (*C11NoReturnAttr) AddChild ¶
func (n *C11NoReturnAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*C11NoReturnAttr) Address ¶
func (n *C11NoReturnAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*C11NoReturnAttr) Children ¶
func (n *C11NoReturnAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*C11NoReturnAttr) Position ¶
func (n *C11NoReturnAttr) Position() Position
Position returns the position in the original source code.
type C4goErrorNode ¶
type C4goErrorNode struct { }
C4goErrorNode is error node type
func (C4goErrorNode) AddChild ¶
func (n C4goErrorNode) AddChild(_ Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (C4goErrorNode) Address ¶
func (n C4goErrorNode) Address() (a Address)
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (C4goErrorNode) Children ¶
func (n C4goErrorNode) Children() (node []Node)
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (C4goErrorNode) Position ¶
func (n C4goErrorNode) Position() (p Position)
Position returns the position in the original source code.
type CStyleCastExpr ¶
type CStyleCastExpr struct { Addr Address Pos Position Type string Type2 string Kind string ChildNodes []Node }
CStyleCastExpr is expression.
func (*CStyleCastExpr) AddChild ¶
func (n *CStyleCastExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CStyleCastExpr) Address ¶
func (n *CStyleCastExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CStyleCastExpr) Children ¶
func (n *CStyleCastExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CStyleCastExpr) Position ¶
func (n *CStyleCastExpr) Position() Position
Position returns the position in the original source code.
type CXXConstructExpr ¶
type CXXConstructExpr struct { Addr Address Pos Position Position2 string Type string Type2 string ChildNodes []Node }
CXXConstructExpr is node constructor.
func (*CXXConstructExpr) AddChild ¶
func (n *CXXConstructExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXConstructExpr) Address ¶
func (n *CXXConstructExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CXXConstructExpr) Children ¶
func (n *CXXConstructExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CXXConstructExpr) Position ¶
func (n *CXXConstructExpr) Position() Position
Position returns the position in the original source code.
type CXXConstructorDecl ¶
type CXXConstructorDecl struct { Addr Address Parent string Prev string Pos Position Position2 string IsImplicit bool IsUsed bool Type string Type2 string IsInline bool Other string ChildNodes []Node }
CXXConstructorDecl is node constructor.
func (*CXXConstructorDecl) AddChild ¶
func (n *CXXConstructorDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXConstructorDecl) Address ¶
func (n *CXXConstructorDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CXXConstructorDecl) Children ¶
func (n *CXXConstructorDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CXXConstructorDecl) Position ¶
func (n *CXXConstructorDecl) Position() Position
Position returns the position in the original source code.
type CXXMemberCallExpr ¶
type CXXMemberCallExpr struct {
*CallExpr
}
CXXMemberCallExpr struct
func (*CXXMemberCallExpr) AddChild ¶
func (n *CXXMemberCallExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXMemberCallExpr) Address ¶
func (n *CXXMemberCallExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CXXMemberCallExpr) Children ¶
func (n *CXXMemberCallExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CXXMemberCallExpr) Position ¶
func (n *CXXMemberCallExpr) Position() Position
Position returns the position in the original source code.
type CXXMethodDecl ¶
type CXXMethodDecl struct { Addr Address Parent string Prev string Pos Position Position2 string IsImplicit bool IsUsed bool MethodName string Type string IsInline bool Other string ChildNodes []Node }
CXXMethodDecl method of class
func (*CXXMethodDecl) AddChild ¶
func (n *CXXMethodDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXMethodDecl) Address ¶
func (n *CXXMethodDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CXXMethodDecl) Children ¶
func (n *CXXMethodDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CXXMethodDecl) Position ¶
func (n *CXXMethodDecl) Position() Position
Position returns the position in the original source code.
type CXXRecord ¶
CXXRecord struct
func (*CXXRecord) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXRecord) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type CXXRecordDecl ¶
type CXXRecordDecl struct {
*RecordDecl
}
CXXRecordDecl is node represents a record declaration.
func (*CXXRecordDecl) AddChild ¶
func (n *CXXRecordDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXRecordDecl) Address ¶
func (n *CXXRecordDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CXXRecordDecl) Children ¶
func (n *CXXRecordDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CXXRecordDecl) Position ¶
func (n *CXXRecordDecl) Position() Position
Position returns the position in the original source code.
type CXXThisExpr ¶
CXXThisExpr
func (*CXXThisExpr) AddChild ¶
func (n *CXXThisExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CXXThisExpr) Address ¶
func (n *CXXThisExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CXXThisExpr) Children ¶
func (n *CXXThisExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CXXThisExpr) Position ¶
func (n *CXXThisExpr) Position() Position
Position returns the position in the original source code.
type CallExpr ¶
CallExpr is expression.
func (*CallExpr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CallExpr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type CaseStmt ¶
CaseStmt is node represent 'case'
func (*CaseStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CaseStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type CharacterLiteral ¶
CharacterLiteral is type of character literal
func (*CharacterLiteral) AddChild ¶
func (n *CharacterLiteral) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CharacterLiteral) Address ¶
func (n *CharacterLiteral) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CharacterLiteral) Children ¶
func (n *CharacterLiteral) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CharacterLiteral) Position ¶
func (n *CharacterLiteral) Position() Position
Position returns the position in the original source code.
type CharacterLiteralError ¶
type CharacterLiteralError struct { Node *CharacterLiteral Err error }
CharacterLiteralError represents one instance of an error where the exact character value of a CharacterLiteral could not be determined from the original source. See RepairCharacterLiteralsFromSource for a full explanation.
type CompoundAssignOperator ¶
type CompoundAssignOperator struct { Addr Address Pos Position Type string Type2 string Opcode string ComputationLHSType string ComputationLHSType2 string ComputationResultType string ComputationResultType2 string ChildNodes []Node }
CompoundAssignOperator is type of compound assign operator
func (*CompoundAssignOperator) AddChild ¶
func (n *CompoundAssignOperator) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CompoundAssignOperator) Address ¶
func (n *CompoundAssignOperator) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CompoundAssignOperator) Children ¶
func (n *CompoundAssignOperator) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CompoundAssignOperator) Position ¶
func (n *CompoundAssignOperator) Position() Position
Position returns the position in the original source code.
type CompoundLiteralExpr ¶
type CompoundLiteralExpr struct { Addr Address Pos Position Type1 string Type2 string IsLvalue bool ChildNodes []Node }
CompoundLiteralExpr C99 6.5.2.5
func (*CompoundLiteralExpr) AddChild ¶
func (n *CompoundLiteralExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CompoundLiteralExpr) Address ¶
func (n *CompoundLiteralExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CompoundLiteralExpr) Children ¶
func (n *CompoundLiteralExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CompoundLiteralExpr) Position ¶
func (n *CompoundLiteralExpr) Position() Position
Position returns the position in the original source code.
type CompoundStmt ¶
type CompoundStmt struct { Addr Address Pos Position ChildNodes []Node // TODO: remove this BelongsToSwitch bool }
CompoundStmt is node represents a compound of nodes
func (*CompoundStmt) AddChild ¶
func (n *CompoundStmt) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*CompoundStmt) Address ¶
func (n *CompoundStmt) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*CompoundStmt) Children ¶
func (n *CompoundStmt) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*CompoundStmt) Position ¶
func (n *CompoundStmt) Position() Position
Position returns the position in the original source code.
type ConditionalOperator ¶
type ConditionalOperator struct { Addr Address Pos Position Type string Type2 string ChildNodes []Node }
ConditionalOperator is type of condition operator
func (*ConditionalOperator) AddChild ¶
func (n *ConditionalOperator) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ConditionalOperator) Address ¶
func (n *ConditionalOperator) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ConditionalOperator) Children ¶
func (n *ConditionalOperator) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ConditionalOperator) Position ¶
func (n *ConditionalOperator) Position() Position
Position returns the position in the original source code.
type ConstAttr ¶
ConstAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*ConstAttr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ConstAttr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type ConstantArrayType ¶
ConstantArrayType is constant array type
func (*ConstantArrayType) AddChild ¶
func (n *ConstantArrayType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ConstantArrayType) Address ¶
func (n *ConstantArrayType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ConstantArrayType) Children ¶
func (n *ConstantArrayType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ConstantArrayType) Position ¶
func (n *ConstantArrayType) Position() Position
Position returns the position in the original source code.
type ConstantExpr ¶
type ConstantExpr struct { Addr Address Pos Position Position2 string Type string Value string ChildNodes []Node }
ConstantExpr is node constructor.
func (*ConstantExpr) AddChild ¶
func (n *ConstantExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ConstantExpr) Address ¶
func (n *ConstantExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ConstantExpr) Children ¶
func (n *ConstantExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ConstantExpr) Position ¶
func (n *ConstantExpr) Position() Position
Position returns the position in the original source code.
type ContinueStmt ¶
ContinueStmt is node represent 'continue'
func (*ContinueStmt) AddChild ¶
func (n *ContinueStmt) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ContinueStmt) Address ¶
func (n *ContinueStmt) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ContinueStmt) Children ¶
func (n *ContinueStmt) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ContinueStmt) Position ¶
func (n *ContinueStmt) Position() Position
Position returns the position in the original source code.
type DecayedType ¶
DecayedType is decayed type
func (*DecayedType) AddChild ¶
func (n *DecayedType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DecayedType) Address ¶
func (n *DecayedType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*DecayedType) Children ¶
func (n *DecayedType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*DecayedType) Position ¶
func (n *DecayedType) Position() Position
Position returns the position in the original source code.
type DeclRefExpr ¶
type DeclRefExpr struct { Addr Address Pos Position Type string Type1 string IsLvalue bool For string Address2 string Name string Type2 string Type3 string Other string ChildNodes []Node }
DeclRefExpr is expression.
func (*DeclRefExpr) AddChild ¶
func (n *DeclRefExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DeclRefExpr) Address ¶
func (n *DeclRefExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*DeclRefExpr) Children ¶
func (n *DeclRefExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*DeclRefExpr) Position ¶
func (n *DeclRefExpr) Position() Position
Position returns the position in the original source code.
type DeclStmt ¶
DeclStmt is node represents a declaration in a statement list.
func (*DeclStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DeclStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type DefaultStmt ¶
DefaultStmt is node represent 'default'
func (*DefaultStmt) AddChild ¶
func (n *DefaultStmt) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DefaultStmt) Address ¶
func (n *DefaultStmt) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*DefaultStmt) Children ¶
func (n *DefaultStmt) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*DefaultStmt) Position ¶
func (n *DefaultStmt) Position() Position
Position returns the position in the original source code.
type DeprecatedAttr ¶
type DeprecatedAttr struct { Addr Address Pos Position Message1 string Message2 string IsInherited bool ChildNodes []Node }
DeprecatedAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*DeprecatedAttr) AddChild ¶
func (n *DeprecatedAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DeprecatedAttr) Address ¶
func (n *DeprecatedAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*DeprecatedAttr) Children ¶
func (n *DeprecatedAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*DeprecatedAttr) Position ¶
func (n *DeprecatedAttr) Position() Position
Position returns the position in the original source code.
type DisableTailCallsAttr ¶
DisableTailCallsAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*DisableTailCallsAttr) AddChild ¶
func (n *DisableTailCallsAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DisableTailCallsAttr) Address ¶
func (n *DisableTailCallsAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*DisableTailCallsAttr) Children ¶
func (n *DisableTailCallsAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*DisableTailCallsAttr) Position ¶
func (n *DisableTailCallsAttr) Position() Position
Position returns the position in the original source code.
type DoStmt ¶
DoStmt is node represent 'do'
func (*DoStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*DoStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type ElaboratedType ¶
ElaboratedType is elaborated type
func (*ElaboratedType) AddChild ¶
func (n *ElaboratedType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ElaboratedType) Address ¶
func (n *ElaboratedType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ElaboratedType) Children ¶
func (n *ElaboratedType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ElaboratedType) Position ¶
func (n *ElaboratedType) Position() Position
Position returns the position in the original source code.
type EmptyDecl ¶
EmptyDecl - element of AST
func (*EmptyDecl) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*EmptyDecl) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type EnableIfAttr ¶
type EnableIfAttr struct { Addr Address Pos Position Message1 string IsInherited bool ChildNodes []Node }
EnableIfAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*EnableIfAttr) AddChild ¶
func (n *EnableIfAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*EnableIfAttr) Address ¶
func (n *EnableIfAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*EnableIfAttr) Children ¶
func (n *EnableIfAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*EnableIfAttr) Position ¶
func (n *EnableIfAttr) Position() Position
Position returns the position in the original source code.
type Enum ¶
Enum struct
func (*Enum) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*Enum) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type EnumConstantDecl ¶
type EnumConstantDecl struct { Addr Address Pos Position Position2 string IsReferenced bool Name string Type string ChildNodes []Node }
EnumConstantDecl is node represents a enum constant declaration.
func (*EnumConstantDecl) AddChild ¶
func (n *EnumConstantDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*EnumConstantDecl) Address ¶
func (n *EnumConstantDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*EnumConstantDecl) Children ¶
func (n *EnumConstantDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*EnumConstantDecl) Position ¶
func (n *EnumConstantDecl) Position() Position
Position returns the position in the original source code.
type EnumDecl ¶
type EnumDecl struct { Addr Address Prev string Parent Address Pos Position Position2 string Name string ChildNodes []Node }
EnumDecl is node represents a enum declaration.
func (*EnumDecl) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*EnumDecl) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type EnumType ¶
EnumType is enum type
func (*EnumType) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*EnumType) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type Field ¶
Field struct
func (*Field) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*Field) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type FieldDecl ¶
type FieldDecl struct { Addr Address Pos Position Position2 string Name string Type string Type2 string IsImplicit bool IsReferenced bool ChildNodes []Node }
FieldDecl is node represents a field declaration.
func (*FieldDecl) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FieldDecl) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type FloatingLiteral ¶
type FloatingLiteral struct { Addr Address Pos Position Type string Value float64 ChildNodes []Node }
FloatingLiteral is type of float literal
func (*FloatingLiteral) AddChild ¶
func (n *FloatingLiteral) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FloatingLiteral) Address ¶
func (n *FloatingLiteral) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FloatingLiteral) Children ¶
func (n *FloatingLiteral) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FloatingLiteral) Position ¶
func (n *FloatingLiteral) Position() Position
Position returns the position in the original source code.
type FloatingLiteralError ¶
type FloatingLiteralError struct { Node *FloatingLiteral Err error }
FloatingLiteralError represents one instance of an error where the exact floating point value of a FloatingLiteral could not be determined from the original source. See RepairFloatingLiteralsFromSource for a full explanation.
func RepairFloatingLiteralsFromSource ¶
func RepairFloatingLiteralsFromSource(rootNode Node, filePP preprocessor.FilePP) ( errs []FloatingLiteralError)
RepairFloatingLiteralsFromSource finds the exact values of floating literals by reading their values directly from the preprocessed source.
The clang AST only serializes floating point values in scientific notation with 7 significant digits. This is not enough when dealing with precise numbers.
The only solution is to read the original floating literal from the source code. We can do this by using the positional information on the node.
If the floating literal cannot be resolved for any reason the original value will remain. This function will return all errors encountered.
type ForStmt ¶
ForStmt is node represent 'for'
func (*ForStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ForStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type FormatArgAttr ¶
FormatArgAttr is a type of attribute that is optionally attached to a function definition.
func (*FormatArgAttr) AddChild ¶
func (n *FormatArgAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FormatArgAttr) Address ¶
func (n *FormatArgAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FormatArgAttr) Children ¶
func (n *FormatArgAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FormatArgAttr) Position ¶
func (n *FormatArgAttr) Position() Position
Position returns the position in the original source code.
type FormatAttr ¶
type FormatAttr struct { Addr Address Pos Position IsImplicit bool IsInherited bool FunctionName string Unknown1 int Unknown2 int ChildNodes []Node }
FormatAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*FormatAttr) AddChild ¶
func (n *FormatAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FormatAttr) Address ¶
func (n *FormatAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FormatAttr) Children ¶
func (n *FormatAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FormatAttr) Position ¶
func (n *FormatAttr) Position() Position
Position returns the position in the original source code.
type FullComment ¶
FullComment is a type of comment
func (*FullComment) AddChild ¶
func (n *FullComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FullComment) Address ¶
func (n *FullComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FullComment) Children ¶
func (n *FullComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FullComment) Position ¶
func (n *FullComment) Position() Position
Position returns the position in the original source code.
type FunctionDecl ¶
type FunctionDecl struct { Addr Address Pos Position Prev string Parent string Position2 string Name string Type string Type2 string IsExtern bool IsImplicit bool IsUsed bool IsReferenced bool IsStatic bool IsInline bool ChildNodes []Node }
FunctionDecl is node represents a function declaration.
func (*FunctionDecl) AddChild ¶
func (n *FunctionDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FunctionDecl) Address ¶
func (n *FunctionDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FunctionDecl) Children ¶
func (n *FunctionDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FunctionDecl) Position ¶
func (n *FunctionDecl) Position() Position
Position returns the position in the original source code.
type FunctionNoProtoType ¶
FunctionNoProtoType is function proto type
func (*FunctionNoProtoType) AddChild ¶
func (n *FunctionNoProtoType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FunctionNoProtoType) Address ¶
func (n *FunctionNoProtoType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FunctionNoProtoType) Children ¶
func (n *FunctionNoProtoType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FunctionNoProtoType) Position ¶
func (n *FunctionNoProtoType) Position() Position
Position returns the position in the original source code.
type FunctionProtoType ¶
FunctionProtoType is function proto type
func (*FunctionProtoType) AddChild ¶
func (n *FunctionProtoType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*FunctionProtoType) Address ¶
func (n *FunctionProtoType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*FunctionProtoType) Children ¶
func (n *FunctionProtoType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*FunctionProtoType) Position ¶
func (n *FunctionProtoType) Position() Position
Position returns the position in the original source code.
type GCCAsmStmt ¶
GCCAsmStmt is node represent gcc assembler
func (*GCCAsmStmt) AddChild ¶
func (n *GCCAsmStmt) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*GCCAsmStmt) Address ¶
func (n *GCCAsmStmt) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*GCCAsmStmt) Children ¶
func (n *GCCAsmStmt) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*GCCAsmStmt) Position ¶
func (n *GCCAsmStmt) Position() Position
Position returns the position in the original source code.
type GenericSelectionExpr ¶
type GenericSelectionExpr struct { Addr Address Pos Position Type string IsLvalue bool ChildNodes []Node }
GenericSelectionExpr is expression.
func (*GenericSelectionExpr) AddChild ¶
func (n *GenericSelectionExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*GenericSelectionExpr) Address ¶
func (n *GenericSelectionExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*GenericSelectionExpr) Children ¶
func (n *GenericSelectionExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*GenericSelectionExpr) Position ¶
func (n *GenericSelectionExpr) Position() Position
Position returns the position in the original source code.
type GotoStmt ¶
GotoStmt is node represent 'goto'
func (*GotoStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*GotoStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type HTMLEndTagComment ¶
HTMLEndTagComment is a type of comment
func (*HTMLEndTagComment) AddChild ¶
func (n *HTMLEndTagComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*HTMLEndTagComment) Address ¶
func (n *HTMLEndTagComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*HTMLEndTagComment) Children ¶
func (n *HTMLEndTagComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*HTMLEndTagComment) Position ¶
func (n *HTMLEndTagComment) Position() Position
Position returns the position in the original source code.
type HTMLStartTagComment ¶
HTMLStartTagComment is a type of comment
func (*HTMLStartTagComment) AddChild ¶
func (n *HTMLStartTagComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*HTMLStartTagComment) Address ¶
func (n *HTMLStartTagComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*HTMLStartTagComment) Children ¶
func (n *HTMLStartTagComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*HTMLStartTagComment) Position ¶
func (n *HTMLStartTagComment) Position() Position
Position returns the position in the original source code.
type IfStmt ¶
IfStmt is node represent 'if'
func (*IfStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*IfStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type ImplicitCastExpr ¶
type ImplicitCastExpr struct { Addr Address Pos Position Type string Type2 string Kind string IsPartExplicitCast bool ChildNodes []Node }
ImplicitCastExpr is expression.
func (*ImplicitCastExpr) AddChild ¶
func (n *ImplicitCastExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ImplicitCastExpr) Address ¶
func (n *ImplicitCastExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ImplicitCastExpr) Children ¶
func (n *ImplicitCastExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ImplicitCastExpr) Position ¶
func (n *ImplicitCastExpr) Position() Position
Position returns the position in the original source code.
type ImplicitValueInitExpr ¶
type ImplicitValueInitExpr struct { Addr Address Pos Position Type1 string Type2 string ChildNodes []Node }
ImplicitValueInitExpr is expression
func (*ImplicitValueInitExpr) AddChild ¶
func (n *ImplicitValueInitExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ImplicitValueInitExpr) Address ¶
func (n *ImplicitValueInitExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ImplicitValueInitExpr) Children ¶
func (n *ImplicitValueInitExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ImplicitValueInitExpr) Position ¶
func (n *ImplicitValueInitExpr) Position() Position
Position returns the position in the original source code.
type IncompleteArrayType ¶
IncompleteArrayType is incomplete array type
func (*IncompleteArrayType) AddChild ¶
func (n *IncompleteArrayType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*IncompleteArrayType) Address ¶
func (n *IncompleteArrayType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*IncompleteArrayType) Children ¶
func (n *IncompleteArrayType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*IncompleteArrayType) Position ¶
func (n *IncompleteArrayType) Position() Position
Position returns the position in the original source code.
type IndirectFieldDecl ¶
type IndirectFieldDecl struct { Addr Address Pos Position Position2 string IsImplicit bool Name string Type string ChildNodes []Node }
IndirectFieldDecl is node represents a indirect field declaration.
func (*IndirectFieldDecl) AddChild ¶
func (n *IndirectFieldDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*IndirectFieldDecl) Address ¶
func (n *IndirectFieldDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*IndirectFieldDecl) Children ¶
func (n *IndirectFieldDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*IndirectFieldDecl) Position ¶
func (n *IndirectFieldDecl) Position() Position
Position returns the position in the original source code.
type InitListExpr ¶
InitListExpr is expression.
func (*InitListExpr) AddChild ¶
func (n *InitListExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*InitListExpr) Address ¶
func (n *InitListExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*InitListExpr) Children ¶
func (n *InitListExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*InitListExpr) Position ¶
func (n *InitListExpr) Position() Position
Position returns the position in the original source code.
type InlineCommandComment ¶
InlineCommandComment is a type of comment
func (*InlineCommandComment) AddChild ¶
func (n *InlineCommandComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*InlineCommandComment) Address ¶
func (n *InlineCommandComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*InlineCommandComment) Children ¶
func (n *InlineCommandComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*InlineCommandComment) Position ¶
func (n *InlineCommandComment) Position() Position
Position returns the position in the original source code.
type IntegerLiteral ¶
IntegerLiteral is type of integer literal
func (*IntegerLiteral) AddChild ¶
func (n *IntegerLiteral) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*IntegerLiteral) Address ¶
func (n *IntegerLiteral) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*IntegerLiteral) Children ¶
func (n *IntegerLiteral) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*IntegerLiteral) Position ¶
func (n *IntegerLiteral) Position() Position
Position returns the position in the original source code.
type LabelStmt ¶
LabelStmt is node represent a label
func (*LabelStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*LabelStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type LinkageSpecDecl ¶
type LinkageSpecDecl struct { Addr Address Pos Position Position2 string IsImplicit bool Name string ChildNodes []Node }
LinkageSpecDecl
func (*LinkageSpecDecl) AddChild ¶
func (n *LinkageSpecDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*LinkageSpecDecl) Address ¶
func (n *LinkageSpecDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*LinkageSpecDecl) Children ¶
func (n *LinkageSpecDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*LinkageSpecDecl) Position ¶
func (n *LinkageSpecDecl) Position() Position
Position returns the position in the original source code.
type MallocAttr ¶
MallocAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*MallocAttr) AddChild ¶
func (n *MallocAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*MallocAttr) Address ¶
func (n *MallocAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*MallocAttr) Children ¶
func (n *MallocAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*MallocAttr) Position ¶
func (n *MallocAttr) Position() Position
Position returns the position in the original source code.
type MaxFieldAlignmentAttr ¶
MaxFieldAlignmentAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*MaxFieldAlignmentAttr) AddChild ¶
func (n *MaxFieldAlignmentAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*MaxFieldAlignmentAttr) Address ¶
func (n *MaxFieldAlignmentAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*MaxFieldAlignmentAttr) Children ¶
func (n *MaxFieldAlignmentAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*MaxFieldAlignmentAttr) Position ¶
func (n *MaxFieldAlignmentAttr) Position() Position
Position returns the position in the original source code.
type MemberExpr ¶
type MemberExpr struct { Addr Address Pos Position Type string Type2 string Name string IsLvalue bool IsBitfield bool Address2 string IsPointer bool Other string ChildNodes []Node }
MemberExpr is expression.
func (*MemberExpr) AddChild ¶
func (n *MemberExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*MemberExpr) Address ¶
func (n *MemberExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*MemberExpr) Children ¶
func (n *MemberExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*MemberExpr) Position ¶
func (n *MemberExpr) Position() Position
Position returns the position in the original source code.
type ModeAttr ¶
ModeAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*ModeAttr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ModeAttr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type NoAliasAttr ¶
NoAliasAttr is a type of attribute that is optionally attached to a function declaration.
func (*NoAliasAttr) AddChild ¶
func (n *NoAliasAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*NoAliasAttr) Address ¶
func (n *NoAliasAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*NoAliasAttr) Children ¶
func (n *NoAliasAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*NoAliasAttr) Position ¶
func (n *NoAliasAttr) Position() Position
Position returns the position in the original source code.
type NoInlineAttr ¶
NoInlineAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*NoInlineAttr) AddChild ¶
func (n *NoInlineAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*NoInlineAttr) Address ¶
func (n *NoInlineAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*NoInlineAttr) Children ¶
func (n *NoInlineAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*NoInlineAttr) Position ¶
func (n *NoInlineAttr) Position() Position
Position returns the position in the original source code.
type NoThrowAttr ¶
type NoThrowAttr struct { Addr Address Pos Position ChildNodes []Node IsImplicit bool IsInherited bool }
NoThrowAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*NoThrowAttr) AddChild ¶
func (n *NoThrowAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*NoThrowAttr) Address ¶
func (n *NoThrowAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*NoThrowAttr) Children ¶
func (n *NoThrowAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*NoThrowAttr) Position ¶
func (n *NoThrowAttr) Position() Position
Position returns the position in the original source code.
type Node ¶
Node represents any node in the AST.
func GetAllNodesOfType ¶
GetAllNodesOfType returns all of the nodes of the tree that match the type provided. The type should be a pointer to an object in the ast package.
The nodes returned may reference each other and there is no guaranteed order in which the nodes are returned.
type NonNullAttr ¶
type NonNullAttr struct { Addr Address Pos Position IsInherited bool A int B int C int D int ChildNodes []Node }
NonNullAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*NonNullAttr) AddChild ¶
func (n *NonNullAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*NonNullAttr) Address ¶
func (n *NonNullAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*NonNullAttr) Children ¶
func (n *NonNullAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*NonNullAttr) Position ¶
func (n *NonNullAttr) Position() Position
Position returns the position in the original source code.
type NotTailCalledAttr ¶
NotTailCalledAttr is a type of attribute that is optionally attached to function declaration.
func (*NotTailCalledAttr) AddChild ¶
func (n *NotTailCalledAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*NotTailCalledAttr) Address ¶
func (n *NotTailCalledAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*NotTailCalledAttr) Children ¶
func (n *NotTailCalledAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*NotTailCalledAttr) Position ¶
func (n *NotTailCalledAttr) Position() Position
Position returns the position in the original source code.
type OffsetOfExpr ¶
OffsetOfExpr is expression.
func (*OffsetOfExpr) AddChild ¶
func (n *OffsetOfExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*OffsetOfExpr) Address ¶
func (n *OffsetOfExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*OffsetOfExpr) Children ¶
func (n *OffsetOfExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*OffsetOfExpr) Position ¶
func (n *OffsetOfExpr) Position() Position
Position returns the position in the original source code.
type OpaqueValueExpr ¶
OpaqueValueExpr is expression.
func (*OpaqueValueExpr) AddChild ¶
func (n *OpaqueValueExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*OpaqueValueExpr) Address ¶
func (n *OpaqueValueExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*OpaqueValueExpr) Children ¶
func (n *OpaqueValueExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*OpaqueValueExpr) Position ¶
func (n *OpaqueValueExpr) Position() Position
Position returns the position in the original source code.
type OverloadableAttr ¶
OverloadableAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*OverloadableAttr) AddChild ¶
func (n *OverloadableAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*OverloadableAttr) Address ¶
func (n *OverloadableAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*OverloadableAttr) Children ¶
func (n *OverloadableAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*OverloadableAttr) Position ¶
func (n *OverloadableAttr) Position() Position
Position returns the position in the original source code.
type PackedAttr ¶
PackedAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*PackedAttr) AddChild ¶
func (n *PackedAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*PackedAttr) Address ¶
func (n *PackedAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*PackedAttr) Children ¶
func (n *PackedAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*PackedAttr) Position ¶
func (n *PackedAttr) Position() Position
Position returns the position in the original source code.
type ParagraphComment ¶
ParagraphComment is a type of comment
func (*ParagraphComment) AddChild ¶
func (n *ParagraphComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ParagraphComment) Address ¶
func (n *ParagraphComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ParagraphComment) Children ¶
func (n *ParagraphComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ParagraphComment) Position ¶
func (n *ParagraphComment) Position() Position
Position returns the position in the original source code.
type ParamCommandComment ¶
ParamCommandComment is a type of comment
func (*ParamCommandComment) AddChild ¶
func (n *ParamCommandComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ParamCommandComment) Address ¶
func (n *ParamCommandComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ParamCommandComment) Children ¶
func (n *ParamCommandComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ParamCommandComment) Position ¶
func (n *ParamCommandComment) Position() Position
Position returns the position in the original source code.
type ParenExpr ¶
type ParenExpr struct { Addr Address Pos Position Type string Type2 string IsLvalue bool IsBitfield bool ChildNodes []Node }
ParenExpr is expression.
func (*ParenExpr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ParenExpr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type ParenType ¶
ParenType is paren type
func (*ParenType) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ParenType) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type ParmVarDecl ¶
type ParmVarDecl struct { Addr Address Pos Position Position2 string Name string Type string Type2 string IsUsed bool IsReferenced bool IsRegister bool ChildNodes []Node }
ParmVarDecl is node represents a parameter of variable declaration.
func (*ParmVarDecl) AddChild ¶
func (n *ParmVarDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ParmVarDecl) Address ¶
func (n *ParmVarDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ParmVarDecl) Children ¶
func (n *ParmVarDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ParmVarDecl) Position ¶
func (n *ParmVarDecl) Position() Position
Position returns the position in the original source code.
type PointerType ¶
PointerType is pointer type
func (*PointerType) AddChild ¶
func (n *PointerType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*PointerType) Address ¶
func (n *PointerType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*PointerType) Children ¶
func (n *PointerType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*PointerType) Position ¶
func (n *PointerType) Position() Position
Position returns the position in the original source code.
type Position ¶
type Position struct { File string // The relative or absolute file path. Line int // Start line LineEnd int // End line Column int // Start column ColumnEnd int // End column // This is the original string that was converted. This is used for // debugging. We could derive this value from the other properties to save // on a bit of memory, but let worry about that later. StringValue string }
Position is type of position in source code
func NewPositionFromString ¶
NewPositionFromString create a Position from string line
func (Position) GetSimpleLocation ¶
GetSimpleLocation - return a string like : "file:line" in according to position Example : " /tmp/1.c:200 "
type PredefinedExpr ¶
type PredefinedExpr struct { Addr Address Pos Position Type string Name string IsLvalue bool ChildNodes []Node }
PredefinedExpr is expression.
func (*PredefinedExpr) AddChild ¶
func (n *PredefinedExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*PredefinedExpr) Address ¶
func (n *PredefinedExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*PredefinedExpr) Children ¶
func (n *PredefinedExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*PredefinedExpr) Position ¶
func (n *PredefinedExpr) Position() Position
Position returns the position in the original source code.
type PureAttr ¶
type PureAttr struct { Addr Address Pos Position IsImplicit bool IsInherited bool ChildNodes []Node }
PureAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*PureAttr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*PureAttr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type QualType ¶
QualType is qual type
func (*QualType) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*QualType) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type Record ¶
Record struct
func (*Record) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*Record) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type RecordDecl ¶
type RecordDecl struct { Addr Address Pos Position Prev string Position2 string Kind string Name string IsImplicit bool IsReferenced bool IsDefinition bool ChildNodes []Node }
RecordDecl is node represents a record declaration.
func (*RecordDecl) AddChild ¶
func (n *RecordDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*RecordDecl) Address ¶
func (n *RecordDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*RecordDecl) Children ¶
func (n *RecordDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*RecordDecl) Position ¶
func (n *RecordDecl) Position() Position
Position returns the position in the original source code.
type RecordType ¶
RecordType is record type
func (*RecordType) AddChild ¶
func (n *RecordType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*RecordType) Address ¶
func (n *RecordType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*RecordType) Children ¶
func (n *RecordType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*RecordType) Position ¶
func (n *RecordType) Position() Position
Position returns the position in the original source code.
type RestrictAttr ¶
RestrictAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*RestrictAttr) AddChild ¶
func (n *RestrictAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*RestrictAttr) Address ¶
func (n *RestrictAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*RestrictAttr) Children ¶
func (n *RestrictAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*RestrictAttr) Position ¶
func (n *RestrictAttr) Position() Position
Position returns the position in the original source code.
type ReturnStmt ¶
ReturnStmt is node represent 'return'
func (*ReturnStmt) AddChild ¶
func (n *ReturnStmt) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ReturnStmt) Address ¶
func (n *ReturnStmt) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ReturnStmt) Children ¶
func (n *ReturnStmt) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ReturnStmt) Position ¶
func (n *ReturnStmt) Position() Position
Position returns the position in the original source code.
type ReturnsTwiceAttr ¶
type ReturnsTwiceAttr struct { Addr Address Pos Position ChildNodes []Node IsInherited bool IsImplicit bool }
ReturnsTwiceAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*ReturnsTwiceAttr) AddChild ¶
func (n *ReturnsTwiceAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*ReturnsTwiceAttr) Address ¶
func (n *ReturnsTwiceAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*ReturnsTwiceAttr) Children ¶
func (n *ReturnsTwiceAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*ReturnsTwiceAttr) Position ¶
func (n *ReturnsTwiceAttr) Position() Position
Position returns the position in the original source code.
type SentinelAttr ¶
SentinelAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*SentinelAttr) AddChild ¶
func (n *SentinelAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*SentinelAttr) Address ¶
func (n *SentinelAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*SentinelAttr) Children ¶
func (n *SentinelAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*SentinelAttr) Position ¶
func (n *SentinelAttr) Position() Position
Position returns the position in the original source code.
type StaticAssertDecl ¶
StaticAssertDecl
func (*StaticAssertDecl) AddChild ¶
func (n *StaticAssertDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*StaticAssertDecl) Address ¶
func (n *StaticAssertDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*StaticAssertDecl) Children ¶
func (n *StaticAssertDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*StaticAssertDecl) Position ¶
func (n *StaticAssertDecl) Position() Position
Position returns the position in the original source code.
type StmtExpr ¶
StmtExpr is expression.
func (*StmtExpr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*StmtExpr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type StringLiteral ¶
type StringLiteral struct { Addr Address Pos Position Type string Type2 string Value string Runes bool IsLvalue bool ChildNodes []Node }
StringLiteral is type of string literal
func (*StringLiteral) AddChild ¶
func (n *StringLiteral) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*StringLiteral) Address ¶
func (n *StringLiteral) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*StringLiteral) Children ¶
func (n *StringLiteral) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*StringLiteral) Position ¶
func (n *StringLiteral) Position() Position
Position returns the position in the original source code.
type SwitchStmt ¶
SwitchStmt is node represent 'switch'
func (*SwitchStmt) AddChild ¶
func (n *SwitchStmt) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*SwitchStmt) Address ¶
func (n *SwitchStmt) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*SwitchStmt) Children ¶
func (n *SwitchStmt) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*SwitchStmt) Position ¶
func (n *SwitchStmt) Position() Position
Position returns the position in the original source code.
type TextComment ¶
TextComment is a type of comment
func (*TextComment) AddChild ¶
func (n *TextComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*TextComment) Address ¶
func (n *TextComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*TextComment) Children ¶
func (n *TextComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*TextComment) Position ¶
func (n *TextComment) Position() Position
Position returns the position in the original source code.
type TranslationUnitDecl ¶
TranslationUnitDecl is node represents a translation unit declaration.
func (*TranslationUnitDecl) AddChild ¶
func (n *TranslationUnitDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*TranslationUnitDecl) Address ¶
func (n *TranslationUnitDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*TranslationUnitDecl) Children ¶
func (n *TranslationUnitDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*TranslationUnitDecl) Position ¶
func (n *TranslationUnitDecl) Position() Position
Position returns the position in the original source code.
type TransparentUnionAttr ¶
TransparentUnionAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*TransparentUnionAttr) AddChild ¶
func (n *TransparentUnionAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*TransparentUnionAttr) Address ¶
func (n *TransparentUnionAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*TransparentUnionAttr) Children ¶
func (n *TransparentUnionAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*TransparentUnionAttr) Position ¶
func (n *TransparentUnionAttr) Position() Position
Position returns the position in the original source code.
type Typedef ¶
Typedef struct
func (*Typedef) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*Typedef) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type TypedefDecl ¶
type TypedefDecl struct { Addr Address Pos Position Position2 string Name string Type string Type2 string IsImplicit bool IsReferenced bool ChildNodes []Node }
TypedefDecl is node represents a typedef declaration.
func (*TypedefDecl) AddChild ¶
func (n *TypedefDecl) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*TypedefDecl) Address ¶
func (n *TypedefDecl) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*TypedefDecl) Children ¶
func (n *TypedefDecl) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*TypedefDecl) Position ¶
func (n *TypedefDecl) Position() Position
Position returns the position in the original source code.
type TypedefType ¶
TypedefType is typedef type
func (*TypedefType) AddChild ¶
func (n *TypedefType) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*TypedefType) Address ¶
func (n *TypedefType) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*TypedefType) Children ¶
func (n *TypedefType) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*TypedefType) Position ¶
func (n *TypedefType) Position() Position
Position returns the position in the original source code.
type UnaryExprOrTypeTraitExpr ¶
type UnaryExprOrTypeTraitExpr struct { Addr Address Pos Position Type1 string Function string Type2 string Type3 string ChildNodes []Node }
UnaryExprOrTypeTraitExpr is expression.
func (*UnaryExprOrTypeTraitExpr) AddChild ¶
func (n *UnaryExprOrTypeTraitExpr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*UnaryExprOrTypeTraitExpr) Address ¶
func (n *UnaryExprOrTypeTraitExpr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*UnaryExprOrTypeTraitExpr) Children ¶
func (n *UnaryExprOrTypeTraitExpr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*UnaryExprOrTypeTraitExpr) Position ¶
func (n *UnaryExprOrTypeTraitExpr) Position() Position
Position returns the position in the original source code.
type UnaryOperator ¶
type UnaryOperator struct { Addr Address Pos Position Type string Type2 string IsLvalue bool IsPrefix bool IsCannotOverflow bool Operator string ChildNodes []Node }
UnaryOperator is type of unary operator
func (*UnaryOperator) AddChild ¶
func (n *UnaryOperator) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*UnaryOperator) Address ¶
func (n *UnaryOperator) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*UnaryOperator) Children ¶
func (n *UnaryOperator) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*UnaryOperator) Position ¶
func (n *UnaryOperator) Position() Position
Position returns the position in the original source code.
type UnusedAttr ¶
UnusedAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*UnusedAttr) AddChild ¶
func (n *UnusedAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*UnusedAttr) Address ¶
func (n *UnusedAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*UnusedAttr) Children ¶
func (n *UnusedAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*UnusedAttr) Position ¶
func (n *UnusedAttr) Position() Position
Position returns the position in the original source code.
type UsedAttr ¶
UsedAttr is attribute
func (*UsedAttr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*UsedAttr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type VAArgExpr ¶
VAArgExpr is expression.
func (*VAArgExpr) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*VAArgExpr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type VarDecl ¶
type VarDecl struct { Addr Address Prev Address Parent Address Pos Position Position2 string Name string Type string Type2 string IsExtern bool IsUsed bool IsCInit bool IsCallInit bool IsNrvo bool IsReferenced bool IsStatic bool IsRegister bool IsTls bool ChildNodes []Node }
VarDecl is node represents a variable declaration.
func (*VarDecl) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*VarDecl) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type VerbatimBlockComment ¶
type VerbatimBlockComment struct { Addr Address Pos Position Name string CloseName string ChildNodes []Node }
VerbatimBlockComment is a type of comment
func (*VerbatimBlockComment) AddChild ¶
func (n *VerbatimBlockComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*VerbatimBlockComment) Address ¶
func (n *VerbatimBlockComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*VerbatimBlockComment) Children ¶
func (n *VerbatimBlockComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*VerbatimBlockComment) Position ¶
func (n *VerbatimBlockComment) Position() Position
Position returns the position in the original source code.
type VerbatimBlockLineComment ¶
VerbatimBlockLineComment is a type of comment
func (*VerbatimBlockLineComment) AddChild ¶
func (n *VerbatimBlockLineComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*VerbatimBlockLineComment) Address ¶
func (n *VerbatimBlockLineComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*VerbatimBlockLineComment) Children ¶
func (n *VerbatimBlockLineComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*VerbatimBlockLineComment) Position ¶
func (n *VerbatimBlockLineComment) Position() Position
Position returns the position in the original source code.
type VerbatimLineComment ¶
VerbatimLineComment is a type of comment
func (*VerbatimLineComment) AddChild ¶
func (n *VerbatimLineComment) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*VerbatimLineComment) Address ¶
func (n *VerbatimLineComment) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*VerbatimLineComment) Children ¶
func (n *VerbatimLineComment) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*VerbatimLineComment) Position ¶
func (n *VerbatimLineComment) Position() Position
Position returns the position in the original source code.
type VisibilityAttr ¶
type VisibilityAttr struct { Addr Address Pos Position ChildNodes []Node IsDefault bool IsInherited bool IsHidden bool IsImplicit bool }
VisibilityAttr contains information for a VisibilityAttr AST line.
func (*VisibilityAttr) AddChild ¶
func (n *VisibilityAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*VisibilityAttr) Address ¶
func (n *VisibilityAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*VisibilityAttr) Children ¶
func (n *VisibilityAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*VisibilityAttr) Position ¶
func (n *VisibilityAttr) Position() Position
Position returns the position in the original source code.
type WarnUnusedResultAttr ¶
type WarnUnusedResultAttr struct { Addr Address Pos Position Inherited bool Other string ChildNodes []Node }
WarnUnusedResultAttr is a type of attribute that is optionally attached to a variable or struct field definition.
func (*WarnUnusedResultAttr) AddChild ¶
func (n *WarnUnusedResultAttr) AddChild(node Node)
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*WarnUnusedResultAttr) Address ¶
func (n *WarnUnusedResultAttr) Address() Address
Address returns the numeric address of the node. See the documentation for the Address type for more information.
func (*WarnUnusedResultAttr) Children ¶
func (n *WarnUnusedResultAttr) Children() []Node
Children returns the child nodes. If this node does not have any children or this node does not support children it will always return an empty slice.
func (*WarnUnusedResultAttr) Position ¶
func (n *WarnUnusedResultAttr) Position() Position
Position returns the position in the original source code.
type WeakAttr ¶
WeakAttr for the WeakAttr node
func (*WeakAttr) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
type WhileStmt ¶
WhileStmt is node represent 'while'
func (*WhileStmt) AddChild ¶
AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.
func (*WhileStmt) Address ¶
Address returns the numeric address of the node. See the documentation for the Address type for more information.
Source Files
¶
- access_spec_decl.go
- aligned_attr.go
- alloc_align_attr.go
- alloc_size_attr.go
- always_inline_attr.go
- annotate_attr.go
- array_filler.go
- array_subscript_expr.go
- asm_label_attr.go
- ast.go
- attributed_type.go
- availability_attr.go
- binary_conditional_operator.go
- binary_operator.go
- block_command_comment.go
- break_stmt.go
- builtin_attr.go
- builtin_type.go
- c11_no_return_attr.go
- c4go_error_node.go
- c_style_cast_expr.go
- call_expr.go
- case_stmt.go
- character_literal.go
- compound_assign_operator.go
- compound_literal_expr.go
- compound_stmt.go
- conditional_operator.go
- const_attr.go
- constant_array_type.go
- constant_expr.go
- continue_stmt.go
- cxx_construct_expr.go
- cxx_constructor_decl.go
- cxx_member_call_expr.go
- cxx_method_decl.go
- cxx_record.go
- cxx_record_decl.go
- cxx_this_expr.go
- decayed_type.go
- decl_ref_expr.go
- decl_stmt.go
- default_stmt.go
- deprecated_attr.go
- disable_tail_calls_attr.go
- do_stmt.go
- elaborated_type.go
- empty_decl.go
- enable_if_attr.go
- enum.go
- enum_constant_decl.go
- enum_decl.go
- enum_type.go
- field.go
- field_decl.go
- floating_literal.go
- for_stmt.go
- format_arg_attr.go
- format_attr.go
- full_comment.go
- function_decl.go
- function_no_proto_type.go
- function_proto_type.go
- gcc_asm_stmt.go
- generic_selection_expr.go
- go_stmt.go
- html_end_tag_comment.go
- html_start_tag_comment.go
- if_stmt.go
- implicit_cast_expr.go
- implicit_value_init_expr.go
- incomplete_array_type.go
- indirect_field_decl.go
- init_list_expr.go
- inline_command_comment.go
- integer_literal.go
- label_stmt.go
- linkage_spec_decl.go
- malloc_attr.go
- max_field_alignment_attr.go
- member_expr.go
- mode_attr.go
- no_alias_attr.go
- no_inline_attr.go
- no_throw_attr.go
- non_null_attr.go
- not_tail_called_attr.go
- offset_of_expr.go
- opaque_value_expr.go
- overloadable_attr.go
- packed_attr.go
- paragraph_comment.go
- param_command_comment.go
- paren_expr.go
- paren_type.go
- parm_var_decl.go
- pointer_type.go
- position.go
- predefined_expr.go
- pure_attr.go
- qual_type.go
- record.go
- record_decl.go
- record_type.go
- restrict_attr.go
- return_stmt.go
- returns_twice_attr.go
- sentinel_attr.go
- static_assert_decl.go
- stmt_expr.go
- string_literal.go
- switch_stmt.go
- text_comment.go
- translation_unit_decl.go
- transparent_union_attr.go
- traverse.go
- typedef.go
- typedef_decl.go
- typedef_type.go
- unary_expr_or_type_trait_expr.go
- unary_operator.go
- unused_attr.go
- used_attr.go
- util.go
- va_arg_expr.go
- var_decl.go
- verbatim_block_comment.go
- verbatim_block_line_comment.go
- verbatim_line_comment.go
- visibility_attr.go
- warn_unused_result_attr.go
- weak_attr.go
- while_stmt.go