ast

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ast parses the clang AST output into AST structures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateErrorMessage added in v0.12.3

func GenerateErrorMessage(e error, n Node) string

func GenerateWarningMessage added in v0.12.3

func GenerateWarningMessage(e error, n Node) string

func GenerateWarningOrErrorMessage added in v0.12.3

func GenerateWarningOrErrorMessage(e error, n Node, isError bool) string

func Position added in v0.11.3

func Position(node Node) string

Position returns the position of the node in the original file. If the position cannot be determined an empty string is returned.

Types

type AlignedAttr added in v0.11.2

type AlignedAttr struct {
	Address   string
	Position  string
	IsAligned bool
	Children  []Node
}

AlignedAttr is a type of attribute that is optionally attached to a variable or struct field definition.

func (*AlignedAttr) AddChild added in v0.11.2

func (n *AlignedAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type AlwaysInlineAttr

type AlwaysInlineAttr struct {
	Address  string
	Position string
	Children []Node
}

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.

type ArrayFiller added in v0.11.2

type ArrayFiller struct {
	Children []Node
}

func (*ArrayFiller) AddChild added in v0.11.2

func (n *ArrayFiller) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ArraySubscriptExpr

type ArraySubscriptExpr struct {
	Address  string
	Position string
	Type     string
	Kind     string
	Children []Node
}

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.

type AsmLabelAttr

type AsmLabelAttr struct {
	Address      string
	Position     string
	Inherited    bool
	FunctionName string
	Children     []Node
}

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.

type AvailabilityAttr

type AvailabilityAttr struct {
	Address       string
	Position      string
	OS            string
	Version       string
	Unknown1      float64
	Unknown2      int
	IsUnavailable bool
	Message1      string
	Message2      string
	IsInherited   bool
	Children      []Node
}

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.

type BinaryOperator

type BinaryOperator struct {
	Address  string
	Position string
	Type     string
	Operator string
	Children []Node
}

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.

type BreakStmt

type BreakStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*BreakStmt) AddChild

func (n *BreakStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type BuiltinType

type BuiltinType struct {
	Address  string
	Type     string
	Children []Node
}

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.

type CStyleCastExpr

type CStyleCastExpr struct {
	Address  string
	Position string
	Type     string
	Kind     string
	Children []Node
}

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.

type CallExpr

type CallExpr struct {
	Address  string
	Position string
	Type     string
	Children []Node
}

func (*CallExpr) AddChild

func (n *CallExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type CaseStmt added in v0.9.2

type CaseStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*CaseStmt) AddChild added in v0.9.2

func (n *CaseStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type CharacterLiteral

type CharacterLiteral struct {
	Address  string
	Position string
	Type     string
	Value    int
	Children []Node
}

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.

type CompoundAssignOperator added in v0.10.4

type CompoundAssignOperator struct {
	Address               string
	Position              string
	Type                  string
	Opcode                string
	ComputationLHSType    string
	ComputationResultType string
	Children              []Node
}

func (*CompoundAssignOperator) AddChild added in v0.10.4

func (n *CompoundAssignOperator) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type CompoundStmt

type CompoundStmt struct {
	Address  string
	Position string
	Children []Node

	// TODO: remove this
	BelongsToSwitch bool
}

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.

type ConditionalOperator

type ConditionalOperator struct {
	Address  string
	Position string
	Type     string
	Children []Node
}

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.

type ConstAttr

type ConstAttr struct {
	Address  string
	Position string
	Tags     string
	Children []Node
}

func (*ConstAttr) AddChild

func (n *ConstAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ConstantArrayType

type ConstantArrayType struct {
	Address  string
	Type     string
	Size     int
	Children []Node
}

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.

type ContinueStmt added in v0.10.2

type ContinueStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*ContinueStmt) AddChild added in v0.10.2

func (n *ContinueStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type DeclRefExpr

type DeclRefExpr struct {
	Address  string
	Position string
	Type     string
	Lvalue   bool
	For      string
	Address2 string
	Name     string
	Type2    string
	Children []Node
}

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.

type DeclStmt

type DeclStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*DeclStmt) AddChild

func (n *DeclStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type DefaultStmt added in v0.9.2

type DefaultStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*DefaultStmt) AddChild added in v0.9.2

func (n *DefaultStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type DeprecatedAttr

type DeprecatedAttr struct {
	Address  string
	Position string
	Message1 string
	Message2 string
	Children []Node
}

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.

type DoStmt added in v0.9.0

type DoStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*DoStmt) AddChild added in v0.9.0

func (n *DoStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ElaboratedType

type ElaboratedType struct {
	Address  string
	Type     string
	Tags     string
	Children []Node
}

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.

type Enum

type Enum struct {
	Address  string
	Name     string
	Children []Node
}

func (*Enum) AddChild

func (n *Enum) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type EnumConstantDecl

type EnumConstantDecl struct {
	Address    string
	Position   string
	Position2  string
	Referenced bool
	Name       string
	Type       string
	Children   []Node
}

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.

type EnumDecl

type EnumDecl struct {
	Address   string
	Position  string
	Position2 string
	Name      string
	Children  []Node
}

func (*EnumDecl) AddChild

func (n *EnumDecl) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type EnumType

type EnumType struct {
	Address  string
	Name     string
	Children []Node
}

func (*EnumType) AddChild

func (n *EnumType) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type FieldDecl

type FieldDecl struct {
	Address    string
	Position   string
	Position2  string
	Name       string
	Type       string
	Referenced bool
	Children   []Node
}

func (*FieldDecl) AddChild

func (n *FieldDecl) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type FloatingLiteral

type FloatingLiteral struct {
	Address  string
	Position string
	Type     string
	Value    float64
	Children []Node
}

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.

type ForStmt

type ForStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*ForStmt) AddChild

func (n *ForStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type FormatAttr

type FormatAttr struct {
	Address      string
	Position     string
	Implicit     bool
	Inherited    bool
	FunctionName string
	Unknown1     int
	Unknown2     int
	Children     []Node
}

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.

type FunctionDecl

type FunctionDecl struct {
	Address      string
	Position     string
	Prev         string
	Position2    string
	Name         string
	Type         string
	IsExtern     bool
	IsImplicit   bool
	IsUsed       bool
	IsReferenced bool
	Children     []Node
}

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.

type FunctionProtoType

type FunctionProtoType struct {
	Address  string
	Type     string
	Kind     string
	Children []Node
}

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.

type GotoStmt added in v0.11.2

type GotoStmt struct {
	Address   string
	Position  string
	Name      string
	Position2 string
	Children  []Node
}

func (*GotoStmt) AddChild added in v0.11.2

func (n *GotoStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type IfStmt

type IfStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*IfStmt) AddChild

func (n *IfStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ImplicitCastExpr

type ImplicitCastExpr struct {
	Address  string
	Position string
	Type     string
	Kind     string
	Children []Node
}

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.

type ImplicitValueInitExpr added in v0.11.2

type ImplicitValueInitExpr struct {
	Address  string
	Position string
	Type1    string
	Type2    string
	Children []Node
}

func (*ImplicitValueInitExpr) AddChild added in v0.11.2

func (n *ImplicitValueInitExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type IncompleteArrayType added in v0.11.2

type IncompleteArrayType struct {
	Address  string
	Type     string
	Children []Node
}

func (*IncompleteArrayType) AddChild added in v0.11.2

func (n *IncompleteArrayType) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type IndirectFieldDecl added in v0.13.7

type IndirectFieldDecl struct {
	Address   string
	Position  string
	Position2 string
	Implicit  bool
	Name      string
	Type      string
	Children  []Node
}

func (*IndirectFieldDecl) AddChild added in v0.13.7

func (n *IndirectFieldDecl) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type InitListExpr added in v0.11.2

type InitListExpr struct {
	Address  string
	Position string
	Type     string
	Children []Node
}

func (*InitListExpr) AddChild added in v0.11.2

func (n *InitListExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type IntegerLiteral

type IntegerLiteral struct {
	Address  string
	Position string
	Type     string
	Value    string
	Children []Node
}

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.

type LabelStmt added in v0.11.2

type LabelStmt struct {
	Address  string
	Position string
	Name     string
	Children []Node
}

func (*LabelStmt) AddChild added in v0.11.2

func (n *LabelStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type MallocAttr

type MallocAttr struct {
	Address  string
	Position string
	Children []Node
}

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.

type MaxFieldAlignmentAttr added in v0.11.2

type MaxFieldAlignmentAttr struct {
	Address  string
	Position string
	Size     int
	Children []Node
}

func (*MaxFieldAlignmentAttr) AddChild added in v0.11.2

func (n *MaxFieldAlignmentAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type MemberExpr

type MemberExpr struct {
	Address    string
	Position   string
	Type       string
	Type2      string
	Name       string
	IsLvalue   bool
	IsBitfield bool
	Address2   string
	IsPointer  bool
	Children   []Node
}

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) GetDeclRefExpr added in v0.13.3

func (n *MemberExpr) GetDeclRefExpr() *DeclRefExpr

GetDeclRefExpr gets DeclRefExpr from MemberExpr, or nil if there is no DeclRefExpr

type ModeAttr

type ModeAttr struct {
	Address  string
	Position string
	Name     string
	Children []Node
}

func (*ModeAttr) AddChild

func (n *ModeAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type NoInlineAttr added in v0.11.2

type NoInlineAttr struct {
	Address  string
	Position string
	Children []Node
}

func (*NoInlineAttr) AddChild added in v0.11.2

func (n *NoInlineAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type NoThrowAttr

type NoThrowAttr struct {
	Address  string
	Position string
	Children []Node
}

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.

type Node

type Node interface {
	AddChild(node Node)
}

Node represents any node in the AST.

func GetAllNodesOfType added in v0.13.7

func GetAllNodesOfType(root Node, t reflect.Type) []Node

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 guarenteed order in which the nodes are returned.

func Parse

func Parse(line string) Node

Parse takes the coloured output of the clang AST command and returns a root node for the AST.

type NonNullAttr

type NonNullAttr struct {
	Address  string
	Position string
	A        int
	B        int
	Children []Node
}

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.

type OffsetOfExpr added in v0.11.2

type OffsetOfExpr struct {
	Address  string
	Position string
	Type     string
	Children []Node
}

func (*OffsetOfExpr) AddChild added in v0.11.2

func (n *OffsetOfExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type PackedAttr added in v0.11.2

type PackedAttr struct {
	Address  string
	Position string
	Children []Node
}

func (*PackedAttr) AddChild added in v0.11.2

func (n *PackedAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ParenExpr

type ParenExpr struct {
	Address  string
	Position string
	Type     string
	Children []Node
}

func (*ParenExpr) AddChild

func (n *ParenExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ParenType added in v0.9.0

type ParenType struct {
	Address  string
	Type     string
	Sugar    bool
	Children []Node
}

func (*ParenType) AddChild added in v0.9.0

func (n *ParenType) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type ParmVarDecl

type ParmVarDecl struct {
	Address   string
	Position  string
	Position2 string
	Name      string
	Type      string
	Type2     string
	IsUsed    bool
	Children  []Node
}

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.

type PointerType

type PointerType struct {
	Address  string
	Type     string
	Children []Node
}

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.

type PredefinedExpr

type PredefinedExpr struct {
	Address  string
	Position string
	Type     string
	Name     string
	Lvalue   bool
	Children []Node
}

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.

type PureAttr added in v0.9.0

type PureAttr struct {
	Address   string
	Position  string
	Implicit  bool
	Inherited bool
	Children  []Node
}

func (*PureAttr) AddChild added in v0.9.0

func (n *PureAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type QualType

type QualType struct {
	Address  string
	Type     string
	Kind     string
	Children []Node
}

func (*QualType) AddChild

func (n *QualType) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type Record

type Record struct {
	Address  string
	Type     string
	Children []Node
}

func (*Record) AddChild

func (n *Record) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type RecordDecl

type RecordDecl struct {
	Address    string
	Position   string
	Prev       string
	Position2  string
	Kind       string
	Name       string
	Definition bool
	Children   []Node
}

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.

type RecordType

type RecordType struct {
	Address  string
	Type     string
	Children []Node
}

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.

type RestrictAttr

type RestrictAttr struct {
	Address  string
	Position string
	Name     string
	Children []Node
}

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.

type ReturnStmt

type ReturnStmt struct {
	Address  string
	Position string
	Children []Node
}

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.

type ReturnsTwiceAttr added in v0.11.2

type ReturnsTwiceAttr struct {
	Address  string
	Position string
	Children []Node
}

func (*ReturnsTwiceAttr) AddChild added in v0.11.2

func (n *ReturnsTwiceAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type StringLiteral

type StringLiteral struct {
	Address  string
	Position string
	Type     string
	Value    string
	Lvalue   bool
	Children []Node
}

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.

type SwitchStmt added in v0.9.2

type SwitchStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*SwitchStmt) AddChild added in v0.9.2

func (n *SwitchStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type TranslationUnitDecl

type TranslationUnitDecl struct {
	Address  string
	Children []Node
}

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.

type TransparentUnionAttr added in v0.9.0

type TransparentUnionAttr struct {
	Address  string
	Position string
	Children []Node
}

func (*TransparentUnionAttr) AddChild added in v0.9.0

func (n *TransparentUnionAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type Typedef

type Typedef struct {
	Address  string
	Type     string
	Children []Node
}

func (*Typedef) AddChild

func (n *Typedef) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type TypedefDecl

type TypedefDecl struct {
	Address      string
	Position     string
	Position2    string
	Name         string
	Type         string
	Type2        string
	IsImplicit   bool
	IsReferenced bool
	Children     []Node
}

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.

type TypedefType

type TypedefType struct {
	Address  string
	Type     string
	Tags     string
	Children []Node
}

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.

type UnaryExprOrTypeTraitExpr added in v0.11.0

type UnaryExprOrTypeTraitExpr struct {
	Address  string
	Position string
	Type1    string
	Function string
	Type2    string
	Children []Node
}

func (*UnaryExprOrTypeTraitExpr) AddChild added in v0.11.0

func (n *UnaryExprOrTypeTraitExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type UnaryOperator

type UnaryOperator struct {
	Address  string
	Position string
	Type     string
	IsLvalue bool
	IsPrefix bool
	Operator string
	Children []Node
}

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.

type UnusedAttr added in v0.14.0

type UnusedAttr struct {
	Address  string
	Position string
	Children []Node
}

func (*UnusedAttr) AddChild added in v0.14.0

func (n *UnusedAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type VAArgExpr added in v0.11.2

type VAArgExpr struct {
	Address  string
	Position string
	Type     string
	Children []Node
}

func (*VAArgExpr) AddChild added in v0.11.2

func (n *VAArgExpr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type VarDecl

type VarDecl struct {
	Address      string
	Position     string
	Position2    string
	Name         string
	Type         string
	Type2        string
	IsExtern     bool
	IsUsed       bool
	IsCInit      bool
	IsReferenced bool
	Children     []Node
}

func (*VarDecl) AddChild

func (n *VarDecl) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type WarnUnusedResultAttr added in v0.9.0

type WarnUnusedResultAttr struct {
	Address  string
	Position string
	Children []Node
}

func (*WarnUnusedResultAttr) AddChild added in v0.9.0

func (n *WarnUnusedResultAttr) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

type WeakAttr added in v0.13.3

type WeakAttr struct {
	Address  string
	Position string
	Children []Node
}

WeakAttr for the WeakAttr node

func (*WeakAttr) AddChild added in v0.13.3

func (a *WeakAttr) AddChild(node Node)

AddChild method to implements Node interface

type WhileStmt

type WhileStmt struct {
	Address  string
	Position string
	Children []Node
}

func (*WhileStmt) AddChild

func (n *WhileStmt) AddChild(node Node)

AddChild adds a new child node. Child nodes can then be accessed with the Children attribute.

Jump to

Keyboard shortcuts

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