Documentation ¶
Index ¶
- Variables
- func All[T Node](n Node) (res []T)
- func CreateAST(opt *Options) ([]byte, error)
- func CreateLayoutMap(opt *Options) ([]byte, error)
- func First[T Node](n Node) (res T)
- func Fprint(w io.Writer, n Node) error
- func Parse(opt *Options) (ast Node, layout *LayoutMap, err error)
- func Print(n Node) error
- func RegisterNode[T Node]()
- func Visit[T Node](n Node, f func(T) bool)
- type BinaryOperator
- type BlockCommandComment
- type BuiltinType
- type CStyleCastExpr
- type CommentNode
- type CompoundStmt
- func (n *CompoundStmt) At(i int) Node
- func (n *CompoundStmt) Base() *baseNode
- func (n *CompoundStmt) Children() []Node
- func (n *CompoundStmt) Comment() string
- func (n *CompoundStmt) ID() string
- func (n *CompoundStmt) Kind() string
- func (n *CompoundStmt) Location() *Location
- func (n *CompoundStmt) SrcRange() *SourceRange
- type ConditionalOperator
- type ConstValueNode
- type ConstantExpr
- type DeclNode
- type DeclRefExpr
- type ElaboratedType
- type EnumConstantDecl
- type EnumDecl
- type EnumType
- type FieldDecl
- type FullComment
- type FunctionDecl
- type FunctionProtoType
- type IfStmt
- type ImplicitCastExpr
- type IndirectFieldDecl
- type InlineCommandComment
- type IntegerLiteral
- type LayoutMap
- type Location
- type MaxFieldAlignmentAttr
- func (n *MaxFieldAlignmentAttr) At(i int) Node
- func (n *MaxFieldAlignmentAttr) Base() *baseNode
- func (n *MaxFieldAlignmentAttr) Children() []Node
- func (n *MaxFieldAlignmentAttr) Comment() string
- func (n *MaxFieldAlignmentAttr) ID() string
- func (n *MaxFieldAlignmentAttr) Kind() string
- func (n *MaxFieldAlignmentAttr) Location() *Location
- func (n *MaxFieldAlignmentAttr) SrcRange() *SourceRange
- type Node
- type NodeDecl
- type Options
- type ParagraphComment
- type ParamCommandComment
- type ParenExpr
- type ParenType
- type ParmVarDecl
- type PointerType
- type QualType
- type RecordDecl
- type RecordLayout
- type RecordType
- type ReturnStmt
- func (n *ReturnStmt) At(i int) Node
- func (n *ReturnStmt) Base() *baseNode
- func (n *ReturnStmt) Children() []Node
- func (n *ReturnStmt) Comment() string
- func (n *ReturnStmt) ID() string
- func (n *ReturnStmt) Kind() string
- func (n *ReturnStmt) Location() *Location
- func (n *ReturnStmt) SrcRange() *SourceRange
- type SourceRange
- type StaticAssertDecl
- func (n *StaticAssertDecl) At(i int) Node
- func (n *StaticAssertDecl) Base() *baseNode
- func (n *StaticAssertDecl) Children() []Node
- func (n *StaticAssertDecl) Comment() string
- func (n *StaticAssertDecl) ID() string
- func (n *StaticAssertDecl) Kind() string
- func (n *StaticAssertDecl) Location() *Location
- func (n *StaticAssertDecl) SrcRange() *SourceRange
- type StringLiteral
- type TextComment
- type TranslationUnitDecl
- func (n *TranslationUnitDecl) At(i int) Node
- func (n *TranslationUnitDecl) Base() *baseNode
- func (n *TranslationUnitDecl) Children() []Node
- func (n *TranslationUnitDecl) Comment() string
- func (n *TranslationUnitDecl) ID() string
- func (n *TranslationUnitDecl) Kind() string
- func (n *TranslationUnitDecl) Location() *Location
- func (n *TranslationUnitDecl) SrcRange() *SourceRange
- type Type
- type TypeNode
- type TypeVisibilityAttr
- func (n *TypeVisibilityAttr) At(i int) Node
- func (n *TypeVisibilityAttr) Base() *baseNode
- func (n *TypeVisibilityAttr) Children() []Node
- func (n *TypeVisibilityAttr) Comment() string
- func (n *TypeVisibilityAttr) ID() string
- func (n *TypeVisibilityAttr) Kind() string
- func (n *TypeVisibilityAttr) Location() *Location
- func (n *TypeVisibilityAttr) SrcRange() *SourceRange
- type TypedefDecl
- type TypedefType
- type UnaryExprOrTypeTraitExpr
- type UnaryOperator
- type UnknownNode
- func (n *UnknownNode) At(i int) Node
- func (n *UnknownNode) Base() *baseNode
- func (n *UnknownNode) Children() []Node
- func (n *UnknownNode) Comment() string
- func (n *UnknownNode) ID() string
- func (n *UnknownNode) Kind() string
- func (n *UnknownNode) Location() *Location
- func (n *UnknownNode) SrcRange() *SourceRange
- func (n *UnknownNode) UnmarshalValue(rt *refTracker, data *fastjson.Value) error
- type ValueNode
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateLayoutMap ¶
func RegisterNode ¶
func RegisterNode[T Node]()
Types ¶
type BinaryOperator ¶
type BinaryOperator struct { Opcode string `json:"opcode"` // contains filtered or unexported fields }
type BlockCommandComment ¶
type BlockCommandComment struct { Name string `json:"name"` // contains filtered or unexported fields }
func (*BlockCommandComment) AppendTo ¶
func (n *BlockCommandComment) AppendTo(wr *strings.Builder)
type BuiltinType ¶
type BuiltinType struct {
// contains filtered or unexported fields
}
func (*BuiltinType) DesugaredQualifiedType ¶
func (n *BuiltinType) DesugaredQualifiedType() string
func (*BuiltinType) QualifiedType ¶
func (n *BuiltinType) QualifiedType() string
func (*BuiltinType) TypeAliasDeclID ¶
func (n *BuiltinType) TypeAliasDeclID() string
type CStyleCastExpr ¶
type CStyleCastExpr struct { CastKind string `json:"castKind"` // contains filtered or unexported fields }
type CommentNode ¶
type CompoundStmt ¶
type CompoundStmt struct {
// contains filtered or unexported fields
}
func (*CompoundStmt) SrcRange ¶
func (n *CompoundStmt) SrcRange() *SourceRange
type ConditionalOperator ¶
type ConditionalOperator struct {
// contains filtered or unexported fields
}
type ConstValueNode ¶
type ConstantExpr ¶
type ConstantExpr struct { ExpressionValue string `json:"value"` // contains filtered or unexported fields }
func (*ConstantExpr) Value ¶
func (l *ConstantExpr) Value() string
type DeclRefExpr ¶
type DeclRefExpr struct { ReferencedDecl NodeDecl `json:"referencedDecl"` // contains filtered or unexported fields }
type ElaboratedType ¶
type ElaboratedType struct { OwnedTagDecl NodeDecl `json:"ownedTagDecl"` // contains filtered or unexported fields }
func (*ElaboratedType) DesugaredQualifiedType ¶
func (n *ElaboratedType) DesugaredQualifiedType() string
func (*ElaboratedType) QualifiedType ¶
func (n *ElaboratedType) QualifiedType() string
func (*ElaboratedType) TypeAliasDeclID ¶
func (n *ElaboratedType) TypeAliasDeclID() string
type EnumConstantDecl ¶
type EnumType ¶
type EnumType struct { Decl NodeDecl `json:"decl"` // contains filtered or unexported fields }
func (*EnumType) DesugaredQualifiedType ¶
func (n *EnumType) DesugaredQualifiedType() string
func (*EnumType) QualifiedType ¶
func (n *EnumType) QualifiedType() string
func (*EnumType) TypeAliasDeclID ¶
func (n *EnumType) TypeAliasDeclID() string
type FieldDecl ¶
type FullComment ¶
type FullComment struct {
// contains filtered or unexported fields
}
type FunctionDecl ¶
type FunctionProtoType ¶
type FunctionProtoType struct { Cc string `json:"cc"` // contains filtered or unexported fields }
func (*FunctionProtoType) DesugaredQualifiedType ¶
func (n *FunctionProtoType) DesugaredQualifiedType() string
func (*FunctionProtoType) QualifiedType ¶
func (n *FunctionProtoType) QualifiedType() string
func (*FunctionProtoType) TypeAliasDeclID ¶
func (n *FunctionProtoType) TypeAliasDeclID() string
type IfStmt ¶
type IfStmt struct {
// contains filtered or unexported fields
}
func (*IfStmt) SrcRange ¶
func (n *IfStmt) SrcRange() *SourceRange
type ImplicitCastExpr ¶
type IndirectFieldDecl ¶
type IndirectFieldDecl struct { IsImplicit bool `json:"isImplicit"` // contains filtered or unexported fields }
type InlineCommandComment ¶
type InlineCommandComment struct { Name string `json:"name"` RenderKind string `json:"renderKind"` Args []string `json:"args"` // contains filtered or unexported fields }
func (*InlineCommandComment) AppendTo ¶
func (n *InlineCommandComment) AppendTo(wr *strings.Builder)
type IntegerLiteral ¶
type IntegerLiteral struct {
ConstantExpr
}
type LayoutMap ¶
type LayoutMap struct { Records []*RecordLayout Map map[string]*RecordLayout }
func ParseLayoutMap ¶
func (*LayoutMap) UnmarshalString ¶
type MaxFieldAlignmentAttr ¶
type MaxFieldAlignmentAttr struct { Implicit bool `json:"implicit"` // contains filtered or unexported fields }
func (*MaxFieldAlignmentAttr) SrcRange ¶
func (n *MaxFieldAlignmentAttr) SrcRange() *SourceRange
type Node ¶
type NodeDecl ¶
type ParagraphComment ¶
type ParagraphComment struct {
// contains filtered or unexported fields
}
type ParamCommandComment ¶
type ParamCommandComment struct { Direction string `json:"direction"` Param string `json:"param"` ParamIdx int `json:"paramIdx"` // contains filtered or unexported fields }
func (*ParamCommandComment) AppendTo ¶
func (n *ParamCommandComment) AppendTo(wr *strings.Builder)
type ParenType ¶
type ParenType struct {
// contains filtered or unexported fields
}
func (*ParenType) DesugaredQualifiedType ¶
func (n *ParenType) DesugaredQualifiedType() string
func (*ParenType) QualifiedType ¶
func (n *ParenType) QualifiedType() string
func (*ParenType) TypeAliasDeclID ¶
func (n *ParenType) TypeAliasDeclID() string
type ParmVarDecl ¶
type PointerType ¶
type PointerType struct {
// contains filtered or unexported fields
}
func (*PointerType) DesugaredQualifiedType ¶
func (n *PointerType) DesugaredQualifiedType() string
func (*PointerType) QualifiedType ¶
func (n *PointerType) QualifiedType() string
func (*PointerType) TypeAliasDeclID ¶
func (n *PointerType) TypeAliasDeclID() string
type QualType ¶
type QualType struct { Qualifiers string `json:"qualifiers"` // contains filtered or unexported fields }
func (*QualType) DesugaredQualifiedType ¶
func (n *QualType) DesugaredQualifiedType() string
func (*QualType) QualifiedType ¶
func (n *QualType) QualifiedType() string
func (*QualType) TypeAliasDeclID ¶
func (n *QualType) TypeAliasDeclID() string
type RecordDecl ¶
type RecordLayout ¶
type RecordLayout struct {
Size, Align int
// contains filtered or unexported fields
}
func (*RecordLayout) UnmarshalString ¶
func (r *RecordLayout) UnmarshalString(data string) error
type RecordType ¶
type RecordType struct { Decl NodeDecl `json:"decl"` // contains filtered or unexported fields }
func (*RecordType) DesugaredQualifiedType ¶
func (n *RecordType) DesugaredQualifiedType() string
func (*RecordType) QualifiedType ¶
func (n *RecordType) QualifiedType() string
func (*RecordType) TypeAliasDeclID ¶
func (n *RecordType) TypeAliasDeclID() string
type ReturnStmt ¶
type ReturnStmt struct {
// contains filtered or unexported fields
}
func (*ReturnStmt) SrcRange ¶
func (n *ReturnStmt) SrcRange() *SourceRange
type SourceRange ¶
type StaticAssertDecl ¶
type StaticAssertDecl struct {
// contains filtered or unexported fields
}
func (*StaticAssertDecl) SrcRange ¶
func (n *StaticAssertDecl) SrcRange() *SourceRange
type StringLiteral ¶
type StringLiteral struct {
ConstantExpr
}
type TextComment ¶
type TextComment struct { Text string `json:"text"` // contains filtered or unexported fields }
func (*TextComment) AppendTo ¶
func (n *TextComment) AppendTo(wr *strings.Builder)
type TranslationUnitDecl ¶
type TranslationUnitDecl struct {
// contains filtered or unexported fields
}
func (*TranslationUnitDecl) SrcRange ¶
func (n *TranslationUnitDecl) SrcRange() *SourceRange
type Type ¶
type TypeVisibilityAttr ¶
type TypeVisibilityAttr struct { Implicit bool `json:"implicit"` // contains filtered or unexported fields }
func (*TypeVisibilityAttr) SrcRange ¶
func (n *TypeVisibilityAttr) SrcRange() *SourceRange
type TypedefDecl ¶
type TypedefType ¶
type TypedefType struct { Decl NodeDecl `json:"decl"` // contains filtered or unexported fields }
func (*TypedefType) DesugaredQualifiedType ¶
func (n *TypedefType) DesugaredQualifiedType() string
func (*TypedefType) QualifiedType ¶
func (n *TypedefType) QualifiedType() string
func (*TypedefType) TypeAliasDeclID ¶
func (n *TypedefType) TypeAliasDeclID() string
type UnaryExprOrTypeTraitExpr ¶
type UnaryOperator ¶
type UnknownNode ¶
type UnknownNode struct { Raw json.RawMessage // contains filtered or unexported fields }
func (*UnknownNode) SrcRange ¶
func (n *UnknownNode) SrcRange() *SourceRange
func (*UnknownNode) UnmarshalValue ¶
func (n *UnknownNode) UnmarshalValue(rt *refTracker, data *fastjson.Value) error
Click to show internal directories.
Click to hide internal directories.