Versions in this module Expand all Collapse all v0 v0.0.0 Apr 27, 2018 Changes in this version + var BoolType = &Type + var CharType = newType(Char) + var DoubleType = newType(Double) + var FloatType = newType(Float) + var IntType = newType(Int) + var LongType = newType(Long) + var LonglongType = newType(Longlong) + var ShortType = newType(Short) + var UcharType = newType(Uchar) + var UintType = newType(Uint) + var UlongType = newType(Ulong) + var UlonglongType = newType(Ulonglong) + var UshortType = newType(Ushort) + var VoidType = newType(Void) + func AddInclude(dir string) + func Postorder(x Syntax, f func(Syntax)) + func Preorder(x Syntax, f func(Syntax)) + func Walk(x Syntax, before, after func(Syntax)) + type Comment struct + Suffix bool + Text string + type Comments struct + After []Comment + Before []Comment + Suffix []Comment + type Decl struct + Body *Stmt + CurFn *Decl + GoPackage string + Init *Init + Name string + OuterType *Type + Storage Storage + Type *Type + XOuter *Decl + func (d *Decl) String() string + type Expr struct + Block []*Stmt + Init *Init + Left *Expr + List []*Expr + Op ExprOp + Right *Expr + Text string + Texts []string + Type *Type + XDecl *Decl + XType *Type + func ParseExpr(str string) (*Expr, error) + func (x *Expr) String() string + type ExprOp int + const Add + const AddEq + const Addr + const And + const AndAnd + const AndEq + const Arrow + const Call + const Cast + const CastInit + const Comma + const Cond + const Div + const DivEq + const Dot + const Eq + const EqEq + const Gt + const GtEq + const Index + const Indir + const Lsh + const LshEq + const Lt + const LtEq + const Minus + const Mod + const ModEq + const Mul + const MulEq + const Name + const Not + const NotEq + const Number + const Offsetof + const Or + const OrEq + const OrOr + const Paren + const Plus + const PostDec + const PostInc + const PreDec + const PreInc + const Rsh + const RshEq + const SizeofExpr + const SizeofType + const String + const Sub + const SubEq + const Twid + const VaArg + const Xor + const XorEq + func (op ExprOp) String() string + type Header struct + type Init struct + Braced []*Init + Expr *Expr + Prefix []*Prefix + XType *Type + type Label struct + Expr *Expr + Name string + Op LabelOp + type LabelOp int + const Case + const Default + const LabelName + type Pos struct + Byte int + File string + Line int + type Prefix struct + Dot string + Index *Expr + Span Span + XDecl *Decl + type Printer struct + func (p *Printer) Bytes() []byte + func (p *Printer) EndHTML() + func (p *Printer) Print(args ...interface{}) + func (p *Printer) StartHTML() + func (p *Printer) String() string + type Prog struct + Decls []*Decl + func Read(name string, r io.Reader) (*Prog, error) + func ReadMany(names []string, readers []io.Reader) (*Prog, error) + type Scope struct + Decl map[string]*Decl + Next *Scope + Tag map[string]*Type + type Span struct + End Pos + Start Pos + func (l Span) String() string + type Stmt struct + Block []*Stmt + Body *Stmt + Decl *Decl + Else *Stmt + Expr *Expr + Labels []*Label + Op StmtOp + Post *Expr + Pre *Expr + Text string + Type *Type + type StmtOp int + const ARGBEGIN + const Block + const Break + const Continue + const Do + const Empty + const For + const Goto + const If + const Return + const StmtDecl + const StmtExpr + const Switch + const While + type Storage int + const Auto + const Extern + const Inline + const Register + const Static + const Typedef + func (c Storage) String() string + type Syntax interface + GetComments func() *Comments + GetSpan func() Span + type SyntaxInfo struct + Comments Comments + Span Span + func (s *SyntaxInfo) GetComments() *Comments + func (s *SyntaxInfo) GetSpan() Span + type Type struct + Base *Type + Decls []*Decl + Kind TypeKind + Name string + Qual TypeQual + Tag string + TypeDecl *Decl + Width *Expr + func (t *Type) Def() *Type + func (t *Type) Is(k TypeKind) bool + func (t *Type) IsPtrVoid() bool + func (t *Type) String() string + type TypeKind int + const Array + const Char + const Double + const Enum + const Float + const Func + const Int + const Long + const Longlong + const Ptr + const Short + const Struct + const TypedefType + const Uchar + const Uint + const Ulong + const Ulonglong + const Union + const Ushort + const Void + func (k TypeKind) String() string + type TypeQual int + const Const + const Volatile + func (q TypeQual) String() string + type TypedName struct + Name string + Type *Type