Versions in this module Expand all Collapse all v0 v0.3.0 Jul 26, 2025 v0.2.0 Jul 19, 2025 Changes in this version + func Write(node Node, output io.Writer) type BinaryExpr + func BinaryExpression(x Expr, op token.Token, y Expr) *BinaryExpr + type CmdExpr struct + Name *Ident + Recv []Expr + func Break(n ...int) *CmdExpr + func CmdExpression(name string, args ...Expr) *CmdExpr + func Continue(n ...int) *CmdExpr + func ExecCmd(args ...Expr) *CmdExpr + func Exit(n ...int) *CmdExpr + func False() *CmdExpr + func NoOpCmd(args ...Expr) *CmdExpr + func SourceCmd(file string) *CmdExpr + func True() *CmdExpr + func (x *CmdExpr) End() token.Pos + func (x *CmdExpr) Pos() token.Pos type CmdGroup + Closing token.Pos + Op token.Token + Opening token.Pos + func (x *CmdGroup) End() token.Pos + func (x *CmdGroup) Pos() token.Pos + type CmdListExpr struct + Cmds []Expr + CtrOp token.Token + func (x *CmdListExpr) End() token.Pos + func (x *CmdListExpr) Pos() token.Pos type Ident + func Identifier(name string) *Ident + func Option(name string) *Ident + type ParamExp interface type ParamExpExpr + ParamExp ParamExp + type PipelineExpr struct + Cmds []Expr + CtrOp token.Token + func (x *PipelineExpr) End() token.Pos + func (x *PipelineExpr) Pos() token.Pos type ProcSubst + Closing token.Pos + CtrOp token.Token + Opening token.Pos + type Redirect struct + CtrOp token.Token + N Expr + OpPos token.Pos + Word Expr + func (x *Redirect) End() token.Pos + func (x *Redirect) Pos() token.Pos + type Word struct + Val string + ValPos token.Pos + func Literal(v string) *Word + func (x *Word) End() token.Pos + func (x *Word) Pos() token.Pos v0.1.0 Jul 11, 2025 Changes in this version + const ExpOperatorA + const ExpOperatorE + const ExpOperatorK + const ExpOperatorL + const ExpOperatorP + const ExpOperatorQ + const ExpOperatorU + const ExpOperatora + const ExpOperatork + const ExpOperatoru + func Inspect(node Node, f func(Node) bool) + func Print(node Node) + func String(node Node) string + func Walk(v Visitor, node Node) + type ArithEvalExpr struct + Lparen token.Pos + Rparen token.Pos + X Expr + func (e *ArithEvalExpr) String() string + func (x *ArithEvalExpr) End() token.Pos + func (x *ArithEvalExpr) Pos() token.Pos + type ArithExpr struct + Dollar token.Pos + Lparen token.Pos + Rparen token.Pos + X Expr + func (e *ArithExpr) String() string + func (x *ArithExpr) End() token.Pos + func (x *ArithExpr) Pos() token.Pos + type ArrExpr struct + Lparen token.Pos + Rparen token.Pos + Vars []Expr + func (e *ArrExpr) String() string + func (x *ArrExpr) End() token.Pos + func (x *ArrExpr) Pos() token.Pos + type ArrayIndexExp struct + Bitnot token.Pos + Lbracket token.Pos + Rbracket token.Pos + Tok token.Token + TokPos token.Pos + type AssignStmt struct + Assign token.Pos + Lhs Expr + Local token.Pos + Rhs Expr + func (s *AssignStmt) End() token.Pos + func (s *AssignStmt) Pos() token.Pos + type BasicLit struct + Kind token.Token + Value string + ValuePos token.Pos + func (e *BasicLit) String() string + func (x *BasicLit) End() token.Pos + func (x *BasicLit) Pos() token.Pos + type BinaryExpr struct + Compress bool + Op token.Token + OpPos token.Pos + X Expr + Y Expr + func (e *BinaryExpr) String() string + func (x *BinaryExpr) End() token.Pos + func (x *BinaryExpr) Pos() token.Pos + type BlockStmt struct + Closing token.Pos + List []Stmt + Opening token.Pos + Tok token.Token + func (s *BlockStmt) End() token.Pos + func (s *BlockStmt) Pos() token.Pos + type BreakStmt struct + Break token.Pos + func (s *BreakStmt) End() token.Pos + func (s *BreakStmt) Pos() token.Pos + type CallExpr struct + Func *Ident + Recv []Expr + func (e *CallExpr) String() string + func (x *CallExpr) End() token.Pos + func (x *CallExpr) Pos() token.Pos + type CaseClause struct + Body *BlockStmt + Conds []Expr + Rparen token.Pos + Semi token.Pos + type CaseConversionExp struct + FirstChar bool + ToUpper bool + type CaseStmt struct + Case token.Pos + Else *BlockStmt + Esac token.Pos + In token.Pos + Patterns []*CaseClause + X Expr + func (s *CaseStmt) End() token.Pos + func (s *CaseStmt) Pos() token.Pos + type CmdGroup struct + Lbrace token.Pos + List []Stmt + Rbrace token.Pos + type CmdSubst struct + Closing token.Pos + Dollar token.Pos + Opening token.Pos + Tok token.Token + X Expr + func (e *CmdSubst) String() string + func (x *CmdSubst) End() token.Pos + func (x *CmdSubst) Pos() token.Pos + type Comment struct + Hash token.Pos + Text string + func (c *Comment) End() token.Pos + func (c *Comment) Pos() token.Pos + type CommentGroup struct + List []*Comment + func (g *CommentGroup) End() token.Pos + func (g *CommentGroup) Pos() token.Pos + type ContinueStmt struct + Continue token.Pos + func (s *ContinueStmt) End() token.Pos + func (s *ContinueStmt) Pos() token.Pos + type Decl interface + type DefaultValAssignExp struct + Assign token.Pos + Colon token.Pos + Val Expr + type DefaultValExp struct + Colon token.Pos + Sub token.Pos + Val Expr + type DelPrefix struct + Hash token.Pos + Longest bool + Val Expr + type DelSuffix struct + Longest bool + Mod token.Pos + Val Expr + type ExpOperator string + type Expr interface + String func() string + type ExprStmt struct + X Expr + func (s *ExprStmt) End() token.Pos + func (s *ExprStmt) Pos() token.Pos + type ExtendedTestExpr struct + Lbrack token.Pos + Rbrack token.Pos + X Expr + func (e *ExtendedTestExpr) String() string + func (x *ExtendedTestExpr) End() token.Pos + func (x *ExtendedTestExpr) Pos() token.Pos + type File struct + Decls []Decl + Doc *CommentGroup + Stmts []Stmt + func (*File) End() token.Pos + func (*File) Pos() token.Pos + type ForInStmt struct + Body *BlockStmt + Do token.Pos + Done token.Pos + For token.Pos + In token.Pos + List Expr + Semi token.Pos + Var Expr + func (s *ForInStmt) End() token.Pos + func (s *ForInStmt) Pos() token.Pos + type ForStmt struct + Body *BlockStmt + Cond Expr + Do token.Pos + Done token.Pos + For token.Pos + Init Node + Lparen token.Pos + Post Node + Rparen token.Pos + Semi1 token.Pos + Semi2 token.Pos + func (s *ForStmt) End() token.Pos + func (s *ForStmt) Pos() token.Pos + type FuncDecl struct + Body *BlockStmt + Function token.Pos + Lparen token.Pos + Name *Ident + Rparen token.Pos + func (d *FuncDecl) End() token.Pos + func (d *FuncDecl) Pos() token.Pos + type Ident struct + Name string + NamePos token.Pos + func (e *Ident) String() string + func (x *Ident) End() token.Pos + func (x *Ident) Pos() token.Pos + type IfStmt struct + Body *BlockStmt + Cond Expr + Else Stmt + Fi token.Pos + If token.Pos + Semi token.Pos + Then token.Pos + func (s *IfStmt) End() token.Pos + func (s *IfStmt) Pos() token.Pos + type IndexExpr struct + Lbrack token.Pos + Rbrack token.Pos + X Expr + Y Expr + func (e *IndexExpr) String() string + func (x *IndexExpr) End() token.Pos + func (x *IndexExpr) Pos() token.Pos + type LengthExp struct + Hash token.Pos + type Node interface + End func() token.Pos + Pos func() token.Pos + type NonNullCheckExp struct + Colon token.Pos + Quest token.Pos + Val Expr + type NonNullExp struct + Add token.Pos + Colon token.Pos + Val Expr + type OperatorExp struct + At token.Pos + Op ExpOperator + type ParamExpExpr struct + Dollar token.Pos + Lbrace token.Pos + Rbrace token.Pos + Var Expr + func (e *ParamExpExpr) String() string + func (x *ParamExpExpr) End() token.Pos + func (x *ParamExpExpr) Pos() token.Pos + type PrefixArrayExp struct + At token.Pos + Bitnot token.Pos + type PrefixExp struct + Bitnot token.Pos + Mul token.Pos + type ProcSubst struct + Lparen token.Pos + Rparen token.Pos + Tok token.Token + TokPos token.Pos + X Expr + func (e *ProcSubst) String() string + func (x *ProcSubst) End() token.Pos + func (x *ProcSubst) Pos() token.Pos + type ReplaceExp struct + All bool + Div1 token.Pos + Div2 token.Pos + New string + Old string + type ReplacePrefixExp struct + Div1 token.Pos + Div2 token.Pos + Hash token.Pos + New string + Old string + type ReplaceSuffixExp struct + Div1 token.Pos + Div2 token.Pos + Mod token.Pos + New string + Old string + type ReturnStmt struct + Return token.Pos + X Expr + func (s *ReturnStmt) End() token.Pos + func (s *ReturnStmt) Pos() token.Pos + type SelectStmt struct + Body *BlockStmt + Do token.Pos + Done token.Pos + In token.Pos + List Expr + Select token.Pos + Semi token.Pos + Var Expr + func (s *SelectStmt) End() token.Pos + func (s *SelectStmt) Pos() token.Pos + type Stmt interface + type SubstringExp struct + Colon1 token.Pos + Colon2 token.Pos + Length int + Offset int + type TestExpr struct + Lbrack token.Pos + Rbrack token.Pos + X Expr + func (e *TestExpr) String() string + func (x *TestExpr) End() token.Pos + func (x *TestExpr) Pos() token.Pos + type UnaryExpr struct + Op token.Token + OpPos token.Pos + X Expr + func (e *UnaryExpr) String() string + func (x *UnaryExpr) End() token.Pos + func (x *UnaryExpr) Pos() token.Pos + type UntilStmt struct + Body *BlockStmt + Cond Expr + Do token.Pos + Done token.Pos + Semi token.Pos + Until token.Pos + func (s *UntilStmt) End() token.Pos + func (s *UntilStmt) Pos() token.Pos + type VarExpExpr struct + Dollar token.Pos + X Expr + func (e *VarExpExpr) String() string + func (x *VarExpExpr) End() token.Pos + func (x *VarExpExpr) Pos() token.Pos + type Visitor interface + Visit func(node Node) (w Visitor) + type WhileStmt struct + Body *BlockStmt + Cond Expr + Do token.Pos + Done token.Pos + Semi token.Pos + While token.Pos + func (s *WhileStmt) End() token.Pos + func (s *WhileStmt) Pos() token.Pos