SYMBOL INDEX (1385 symbols across 68 files) FILE: cmd/gosh/main.go function main (line 24) | func main() { function runAll (line 37) | func runAll() error { function run (line 60) | func run(r *interp.Runner, reader io.Reader, name string) error { function runPath (line 70) | func runPath(r *interp.Runner, path string) error { function runInteractive (line 79) | func runInteractive(r *interp.Runner, stdin io.Reader, stdout, stderr io... FILE: cmd/gosh/main_test.go function TestInteractive (line 194) | func TestInteractive(t *testing.T) { function TestInteractiveExit (line 248) | func TestInteractiveExit(t *testing.T) { function readString (line 265) | func readString(r io.Reader, want string) error { FILE: cmd/shfmt/main.go type boolStringValue (line 30) | type boolStringValue method Set (line 32) | func (b *boolStringValue) Set(val string) error { method String (line 36) | func (b *boolStringValue) String() string { method IsBoolFlag (line 39) | func (*boolStringValue) IsBoolFlag() bool { return true } function boolStringVar (line 41) | func boolStringVar(p *string, name string, value string, usage string) { function langVariantVar (line 46) | func langVariantVar(p *syntax.LangVariant, name string, value syntax.Lan... type multiFlag (line 51) | type multiFlag struct function flagVal (line 56) | func flagVal[T any](short, long string, val T, register func(*T, string,... function main (line 108) | func main() { function formatStdin (line 293) | func formatStdin(name string) error { function walkPath (line 327) | func walkPath(path string, entry fs.DirEntry) error { function propsOptions (line 367) | func propsOptions(lang syntax.LangVariant, props editorconfig.Section) (... function formatPath (line 398) | func formatPath(path string, checkShebang bool) error { function editorConfigLangs (line 452) | func editorConfigLangs(l syntax.LangVariant) []string { function formatBytes (line 469) | func formatBytes(src []byte, path string, fileLang syntax.LangVariant) e... constant terminalGreen (line 576) | terminalGreen = "\u001b[32m" constant terminalRed (line 577) | terminalRed = "\u001b[31m" constant terminalCyan (line 578) | terminalCyan = "\u001b[36m" constant terminalReset (line 579) | terminalReset = "\u001b[0m" constant terminalBold (line 580) | terminalBold = "\u001b[1m" FILE: cmd/shfmt/main_test.go function TestMain (line 14) | func TestMain(m *testing.M) { function TestScript (line 22) | func TestScript(t *testing.T) { FILE: expand/arith.go function Arithm (line 17) | func Arithm(cfg *Config, expr syntax.ArithmExpr) (int, error) { function oneIf (line 107) | func oneIf(b bool) int { function atoi (line 115) | func atoi(s string) int64 { method assgnArit (line 121) | func (cfg *Config) assgnArit(b *syntax.BinaryArithm) (int, error) { function intPow (line 165) | func intPow(a, b int) int { function binArit (line 177) | func binArit(op syntax.BinAritOperator, x, y int) (int, error) { FILE: expand/braces.go function Braces (line 18) | func Braces(word *syntax.Word) []*syntax.Word { function extraLeadingZeros (line 93) | func extraLeadingZeros(s string) int { FILE: expand/braces_test.go function lit (line 13) | func lit(s string) *syntax.Lit { return &syntax.Lit{Value... function word (line 14) | func word(ps ...syntax.WordPart) *syntax.Word { return &syntax.Word{Part... function litWord (line 15) | func litWord(s string) *syntax.Word { return word(lit(s)) } function litWords (line 16) | func litWords(strs ...string) []*syntax.Word { function TestBraces (line 166) | func TestBraces(t *testing.T) { function wantBraceExpParts (line 188) | func wantBraceExpParts(t *testing.T, word *syntax.Word, want bool) { function printWords (line 203) | func printWords(words ...*syntax.Word) string { FILE: expand/environ.go type Environ (line 15) | type Environ interface type WriteEnviron (line 42) | type WriteEnviron interface type ValueKind (line 62) | type ValueKind constant Unknown (line 66) | Unknown ValueKind = iota constant String (line 68) | String constant NameRef (line 70) | NameRef constant Indexed (line 72) | Indexed constant Associative (line 74) | Associative constant KeepValue (line 78) | KeepValue constant Unset (line 84) | Unset = Unknown type Variable (line 89) | type Variable struct method IsSet (line 108) | func (v Variable) IsSet() bool { method Declared (line 115) | func (v Variable) Declared() bool { method Flags (line 121) | func (v Variable) Flags() string { method String (line 142) | func (v Variable) String() string { method Resolve (line 163) | func (v Variable) Resolve(env Environ) (string, Variable) { constant maxNameRefDepth (line 159) | maxNameRefDepth = 100 function FuncEnviron (line 180) | func FuncEnviron(fn func(string) string) Environ { type funcEnviron (line 184) | type funcEnviron method Get (line 186) | func (f funcEnviron) Get(name string) Variable { method Each (line 194) | func (f funcEnviron) Each(func(name string, vr Variable) bool) {} function ListEnviron (line 202) | func ListEnviron(pairs ...string) Environ { function listEnviron_ (line 208) | func listEnviron_(caseInsensitive bool, pairs ...string) Environ { type listEnviron (line 248) | type listEnviron struct method compare (line 253) | func (l listEnviron) compare(a, b string) int { method Get (line 263) | func (l listEnviron) Get(name string) Variable { method Each (line 285) | func (l listEnviron) Each(fn func(name string, vr Variable) bool) { FILE: expand/environ_test.go function TestListEnviron (line 11) | func TestListEnviron(t *testing.T) { function TestGetWithSameSubPrefix (line 72) | func TestGetWithSameSubPrefix(t *testing.T) { FILE: expand/expand.go type Config (line 30) | type Config struct method ifsRune (line 140) | func (cfg *Config) ifsRune(r rune) bool { method ifsJoin (line 149) | func (cfg *Config) ifsJoin(strs []string) string { method strBuilder (line 157) | func (cfg *Config) strBuilder() *strings.Builder { method envGet (line 163) | func (cfg *Config) envGet(name string) string { method envSet (line 167) | func (cfg *Config) envSet(name, value string) error { method fieldJoin (line 412) | func (cfg *Config) fieldJoin(parts []fieldPart) string { method escapedGlobField (line 426) | func (cfg *Config) escapedGlobField(parts []fieldPart) (escaped string... method wordField (line 520) | func (cfg *Config) wordField(wps []syntax.WordPart, ql quoteLevel) ([]... method cmdSubst (line 607) | func (cfg *Config) cmdSubst(cs *syntax.CmdSubst) (string, error) { method wordFields (line 620) | func (cfg *Config) wordFields(wps []syntax.WordPart) ([][]fieldPart, e... method quotedElemFields (line 759) | func (cfg *Config) quotedElemFields(pe *syntax.ParamExp) []string { method sliceElems (line 822) | func (cfg *Config) sliceElems(pe *syntax.ParamExp, elems []string, pos... method expandUser (line 857) | func (cfg *Config) expandUser(field string, moreFields bool) (prefix, ... method glob (line 939) | func (cfg *Config) glob(base, pat string) ([]string, error) { method globDir (line 1070) | func (cfg *Config) globDir(base, dir string, matcher func(string) bool... type UnexpectedCommandError (line 102) | type UnexpectedCommandError struct method Error (line 106) | func (u UnexpectedCommandError) Error() string { function prepareConfig (line 115) | func prepareConfig(cfg *Config) *Config { function Literal (line 181) | func Literal(cfg *Config, word *syntax.Word) (string, error) { function Document (line 199) | func Document(cfg *Config, word *syntax.Word) (string, error) { function Pattern (line 217) | func Pattern(cfg *Config, word *syntax.Word) (string, error) { function Format (line 247) | func Format(cfg *Config, format string, args []string) (string, int, err... function formatInto (line 259) | func formatInto(sb *strings.Builder, format string, args []string) (int,... function Fields (line 445) | func Fields(cfg *Config, words ...*syntax.Word) ([]string, error) { function FieldsSeq (line 459) | func FieldsSeq(cfg *Config, words ...*syntax.Word) iter.Seq2[string, err... type fieldPart (line 506) | type fieldPart struct type quoteLevel (line 511) | type quoteLevel constant quoteNone (line 514) | quoteNone quoteLevel = iota constant quoteDouble (line 515) | quoteDouble constant quoteHeredoc (line 516) | quoteHeredoc constant quoteSingle (line 517) | quoteSingle function findAllIndex (line 905) | func findAllIndex(pat, name string, n int) [][]int { function pathJoin2 (line 921) | func pathJoin2(elem1, elem2 string) string { function pathSplit (line 934) | func pathSplit(path string) []string { function ReadFields (line 1109) | func ReadFields(cfg *Config, s string, n int, raw bool) []string { FILE: expand/expand_nonwindows.go function isWindowsErrPathNotFound (line 8) | func isWindowsErrPathNotFound(error) bool { return false } FILE: expand/expand_test.go function parseWord (line 16) | func parseWord(t *testing.T, src string) *syntax.Word { function TestConfigNils (line 26) | func TestConfigNils(t *testing.T) { function TestFieldsIdempotency (line 67) | func TestFieldsIdempotency(t *testing.T) { function Test_glob (line 95) | func Test_glob(t *testing.T) { type mockFileInfo (line 136) | type mockFileInfo struct method Name (line 144) | func (fi *mockFileInfo) Name() string { return fi.name } method Type (line 145) | func (fi *mockFileInfo) Type() fs.FileMode { return fi.typ } FILE: expand/expand_windows.go function isWindowsErrPathNotFound (line 12) | func isWindowsErrPathNotFound(err error) bool { FILE: expand/param.go function nodeLit (line 20) | func nodeLit(node syntax.Node) string { type UnsetParameterError (line 29) | type UnsetParameterError struct method Error (line 34) | func (u UnsetParameterError) Error() string { function overridingUnset (line 38) | func overridingUnset(pe *syntax.ParamExp) bool { method paramExp (line 52) | func (cfg *Config) paramExp(pe *syntax.ParamExp) (string, error) { function removePattern (line 346) | func removePattern(str, pat string, fromEnd, shortest bool) string { method varInd (line 375) | func (cfg *Config) varInd(vr Variable, idx syntax.ArithmExpr) (string, e... method namesByPrefix (line 421) | func (cfg *Config) namesByPrefix(prefix string) []string { FILE: expand/valuekind_string.go function _ (line 7) | func _() { constant _ValueKind_name (line 19) | _ValueKind_name = "UnknownStringNameRefIndexedAssociativeKeepValue" method String (line 23) | func (i ValueKind) String() string { FILE: fileutil/file.go function HasShebang (line 23) | func HasShebang(bs []byte) bool { function Shebang (line 32) | func Shebang(bs []byte) string { type ScriptConfidence (line 43) | type ScriptConfidence constant ConfNotScript (line 48) | ConfNotScript ScriptConfidence = iota constant ConfIfShebang (line 53) | ConfIfShebang constant ConfIsScript (line 57) | ConfIsScript function CouldBeScript (line 63) | func CouldBeScript(info fs.FileInfo) ScriptConfidence { function CouldBeScript2 (line 70) | func CouldBeScript2(entry fs.DirEntry) ScriptConfidence { FILE: fileutil/file_test.go function TestShebang (line 11) | func TestShebang(t *testing.T) { FILE: internal/pattern.go function ExtendedPatternMatcher (line 18) | func ExtendedPatternMatcher(pat string, mode pattern.Mode) (func(string)... function extNegatedMatcher (line 42) | func extNegatedMatcher(pat string, groups []pattern.NegExtGlobGroup) (fu... FILE: internal/testing.go function TestMainSetup (line 16) | func TestMainSetup() { FILE: interp/api.go type Runner (line 40) | type Runner struct method posixOptByName (line 562) | func (r *Runner) posixOptByName(name string) *bool { method posixOptByFlag (line 571) | func (r *Runner) posixOptByFlag(flag byte) *bool { method bashOptByName (line 580) | func (r *Runner) bashOptByName(name string) (status *bool, supported b... method Reset (line 761) | func (r *Runner) Reset() { method Run (line 911) | func (r *Runner) Run(ctx context.Context, node syntax.Node) error { method Exited (line 952) | func (r *Runner) Exited() bool { method Subshell (line 966) | func (r *Runner) Subshell() *Runner { method subshell (line 973) | func (r *Runner) subshell(background bool) *Runner { type exitStatus (line 178) | type exitStatus struct method clear (line 197) | func (e *exitStatus) clear() { method ok (line 205) | func (e *exitStatus) ok() bool { return e.code == 0 } method oneIf (line 210) | func (e *exitStatus) oneIf(b bool) { method fatal (line 216) | func (e *exitStatus) fatal(err error) { method fromHandlerError (line 228) | func (e *exitStatus) fromHandlerError(err error) { type bgProc (line 244) | type bgProc struct type alias (line 252) | type alias struct function New (line 263) | func New(opts ...RunnerOption) (*Runner, error) { type RunnerOption (line 301) | type RunnerOption function Env (line 307) | func Env(env expand.Environ) RunnerOption { function Dir (line 319) | func Dir(path string) RunnerOption { function Interactive (line 348) | func Interactive(enabled bool) RunnerOption { function Params (line 360) | func Params(args ...string) RunnerOption { function CallHandler (line 419) | func CallHandler(f CallHandlerFunc) RunnerOption { function ExecHandler (line 431) | func ExecHandler(f ExecHandlerFunc) RunnerOption { function ExecHandlers (line 452) | func ExecHandlers(middlewares ...func(next ExecHandlerFunc) ExecHandlerF... function OpenHandler (line 468) | func OpenHandler(f OpenHandlerFunc) RunnerOption { function ReadDirHandler (line 478) | func ReadDirHandler(f ReadDirHandlerFunc) RunnerOption { function ReadDirHandler2 (line 496) | func ReadDirHandler2(f ReadDirHandlerFunc2) RunnerOption { function StatHandler (line 504) | func StatHandler(f StatHandlerFunc) RunnerOption { function stdinFile (line 511) | func stdinFile(r io.Reader) (*os.File, error) { function StdIO (line 543) | func StdIO(in io.Reader, out, err io.Writer) RunnerOption { type runnerOpts (line 591) | type runnerOpts type posixOpt (line 593) | type posixOpt struct type bashOpt (line 598) | type bashOpt struct constant optAllExport (line 736) | optAllExport = iota constant optErrExit (line 737) | optErrExit constant optNoExec (line 738) | optNoExec constant optNoGlob (line 739) | optNoGlob constant optNoUnset (line 740) | optNoUnset constant optXTrace (line 741) | optXTrace constant optPipeFail (line 742) | optPipeFail constant optDotGlob (line 746) | optDotGlob constant optExpandAliases (line 747) | optExpandAliases constant optExtGlob (line 748) | optExtGlob constant optGlobStar (line 749) | optGlobStar constant optNoCaseGlob (line 750) | optNoCaseGlob constant optNullGlob (line 751) | optNullGlob type ExitStatus (line 875) | type ExitStatus method Error (line 877) | func (s ExitStatus) Error() string { return fmt.Sprintf("exit status %... function NewExitStatus (line 884) | func NewExitStatus(status uint8) error { function IsExitStatus (line 893) | func IsExitStatus(err error) (status uint8, ok bool) { FILE: interp/builtin.go function IsBuiltin (line 39) | func IsBuiltin(name string) bool { function atoi (line 120) | func atoi(s string) int64 { type errBuiltinExitStatus (line 126) | type errBuiltinExitStatus method Error (line 128) | func (e errBuiltinExitStatus) Error() string { method Builtin (line 138) | func (hc HandlerContext) Builtin(ctx context.Context, args []string) err... method builtin (line 149) | func (r *Runner) builtin(ctx context.Context, pos syntax.Pos, name strin... function mapfileSplit (line 999) | func mapfileSplit(delim byte, dropDelim bool) bufio.SplitFunc { method printOptLine (line 1021) | func (r *Runner) printOptLine(name string, enabled, supported bool) { method readLine (line 1030) | func (r *Runner) readLine(ctx context.Context, raw bool) ([]byte, error) { method changeDir (line 1077) | func (r *Runner) changeDir(ctx context.Context, cmd, path string) uint8 { function absPath (line 1095) | func absPath(dir, path string) string { method absPath (line 1105) | func (r *Runner) absPath(path string) string { type flagParser (line 1115) | type flagParser struct method more (line 1120) | func (p *flagParser) more() bool { method flag (line 1144) | func (p *flagParser) flag() string { method value (line 1160) | func (p *flagParser) value() string { method args (line 1169) | func (p *flagParser) args() []string { return p.remaining } type getopts (line 1171) | type getopts struct method next (line 1176) | func (g *getopts) next(optstr string, args []string) (opt rune, optarg... method optStatusText (line 1214) | func (r *Runner) optStatusText(status bool) string { FILE: interp/example_test.go function Example (line 18) | func Example() { function ExampleExecHandlers (line 40) | func ExampleExecHandlers() { type nopWriterCloser (line 75) | type nopWriterCloser struct method Write (line 79) | func (nopWriterCloser) Write([]byte) (int, error) { return 0, io.EOF } method Close (line 80) | func (nopWriterCloser) Close() error { return nil } function ExampleOpenHandler (line 82) | func ExampleOpenHandler() { FILE: interp/handler.go function HandlerCtx (line 26) | func HandlerCtx(ctx context.Context) HandlerContext { type handlerCtxKey (line 34) | type handlerCtxKey struct type handlerKind (line 36) | type handlerKind constant _ (line 39) | _ handlerKind = iota constant handlerKindExec (line 40) | handlerKindExec constant handlerKindCall (line 41) | handlerKindCall constant handlerKindOpen (line 42) | handlerKindOpen constant handlerKindReadDir (line 43) | handlerKindReadDir type HandlerContext (line 48) | type HandlerContext struct type CallHandlerFunc (line 97) | type CallHandlerFunc type ExecHandlerFunc (line 113) | type ExecHandlerFunc function DefaultExecHandler (line 124) | func DefaultExecHandler(killTimeout time.Duration) ExecHandlerFunc { function checkStat (line 182) | func checkStat(dir, file string, checkExec bool) (string, error) { function winHasExt (line 200) | func winHasExt(file string) bool { function findExecutable (line 209) | func findExecutable(dir, file string, exts []string) (string, error) { function findFile (line 229) | func findFile(dir, file string, _ []string) (string, error) { function LookPath (line 234) | func LookPath(env expand.Environ, file string) (string, error) { function LookPathDir (line 243) | func LookPathDir(cwd string, env expand.Environ, file string) (string, e... function lookPathDir (line 250) | func lookPathDir(cwd string, env expand.Environ, file string, find findA... function scriptFromPathDir (line 285) | func scriptFromPathDir(cwd string, env expand.Environ, file string) (str... function pathExts (line 289) | func pathExts(env expand.Environ) []string { type OpenHandlerFunc (line 325) | type OpenHandlerFunc function DefaultOpenHandler (line 333) | func DefaultOpenHandler() OpenHandlerFunc { type ReadDirHandlerFunc (line 355) | type ReadDirHandlerFunc type ReadDirHandlerFunc2 (line 360) | type ReadDirHandlerFunc2 function DefaultReadDirHandler (line 364) | func DefaultReadDirHandler() ReadDirHandlerFunc { function DefaultReadDirHandler2 (line 372) | func DefaultReadDirHandler2() ReadDirHandlerFunc2 { type StatHandlerFunc (line 380) | type StatHandlerFunc function DefaultStatHandler (line 384) | func DefaultStatHandler() StatHandlerFunc { FILE: interp/handler_test.go function blocklistOneExec (line 27) | func blocklistOneExec(name string) func(interp.ExecHandlerFunc) interp.E... function blocklistAllExec (line 38) | func blocklistAllExec(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { function blocklistNondevOpen (line 44) | func blocklistNondevOpen(ctx context.Context, path string, flags int, mo... function mockFileOpen (line 52) | func mockFileOpen(ctx context.Context, path string, flags int, mode os.F... function blocklistGlob (line 56) | func blocklistGlob(ctx context.Context, path string) ([]fs.FileInfo, err... function execPrint (line 60) | func execPrint(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { function execExitStatus5 (line 68) | func execExitStatus5(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { function execCustomError (line 74) | func execCustomError(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { function execCustomExitStatus5 (line 80) | func execCustomExitStatus5(next interp.ExecHandlerFunc) interp.ExecHandl... function execDotRunnerBuiltin (line 86) | func execDotRunnerBuiltin(next interp.ExecHandlerFunc) interp.ExecHandle... function execPrintWouldExec (line 102) | func execPrintWouldExec(next interp.ExecHandlerFunc) interp.ExecHandlerF... function TestRunnerHandlers (line 418) | func TestRunnerHandlers(t *testing.T) { type readyBuffer (line 447) | type readyBuffer struct method Write (line 452) | func (b *readyBuffer) Write(p []byte) (n int, err error) { function TestKillTimeout (line 460) | func TestKillTimeout(t *testing.T) { function TestKillSignal (line 543) | func TestKillSignal(t *testing.T) { FILE: interp/interp_test.go constant runnerRunTimeout (line 35) | runnerRunTimeout = 5 * time.Second function parse (line 46) | func parse(tb testing.TB, parser *syntax.Parser, src string) *syntax.File { function BenchmarkRun (line 57) | func BenchmarkRun(b *testing.B) { function TestMain (line 89) | func TestMain(m *testing.M) { function checkBash (line 179) | func checkBash() bool { type concBuffer (line 189) | type concBuffer struct method Write (line 194) | func (c *concBuffer) Write(p []byte) (int, error) { method WriteString (line 201) | func (c *concBuffer) WriteString(s string) (int, error) { method String (line 208) | func (c *concBuffer) String() string { method Reset (line 215) | func (c *concBuffer) Reset() { type runTest (line 221) | type runTest struct function init (line 4018) | func init() { function skipIfUnsupported (line 4036) | func skipIfUnsupported(tb testing.TB, src string) { function TestRunnerRun (line 4045) | func TestRunnerRun(t *testing.T) { function readLines (line 4094) | func readLines(hc interp.HandlerContext) ([][]byte, error) { function absPath (line 4106) | func absPath(dir, path string) string { function testExecHandler (line 4349) | func testExecHandler(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { function TestRunnerRunConfirm (line 4358) | func TestRunnerRunConfirm(t *testing.T) { function TestRunnerOpts (line 4407) | func TestRunnerOpts(t *testing.T) { function TestRunnerContext (line 4536) | func TestRunnerContext(t *testing.T) { function TestCancelBlockedStdinRead (line 4575) | func TestCancelBlockedStdinRead(t *testing.T) { function TestRunnerAltNodes (line 4619) | func TestRunnerAltNodes(t *testing.T) { function TestRunnerDir (line 4645) | func TestRunnerDir(t *testing.T) { function TestRunnerIncremental (line 4738) | func TestRunnerIncremental(t *testing.T) { function TestRunnerResetFields (line 4762) | func TestRunnerResetFields(t *testing.T) { function TestRunnerManyResets (line 4821) | func TestRunnerManyResets(t *testing.T) { function TestRunnerFilename (line 4829) | func TestRunnerFilename(t *testing.T) { function TestRunnerEnvNoModify (line 4846) | func TestRunnerEnvNoModify(t *testing.T) { function TestMalformedPathOnWindows (line 4870) | func TestMalformedPathOnWindows(t *testing.T) { function TestReadShouldNotPanicWithNilStdin (line 4901) | func TestReadShouldNotPanicWithNilStdin(t *testing.T) { function TestRunnerVars (line 4917) | func TestRunnerVars(t *testing.T) { function TestRunnerSubshell (line 4937) | func TestRunnerSubshell(t *testing.T) { function TestRunnerNonFileStdin (line 4978) | func TestRunnerNonFileStdin(t *testing.T) { FILE: interp/os_notunix.go function mkfifo (line 15) | func mkfifo(path string, mode uint32) error { method access (line 22) | func (r *Runner) access(ctx context.Context, path string, mode uint32) e... method unTestOwnOrGrp (line 49) | func (r *Runner) unTestOwnOrGrp(ctx context.Context, op syntax.UnTestOpe... type waitStatus (line 54) | type waitStatus struct method Signaled (line 56) | func (waitStatus) Signaled() bool { return false } method Signal (line 57) | func (waitStatus) Signal() int { return 0 } FILE: interp/os_unix.go function mkfifo (line 18) | func mkfifo(path string, mode uint32) error { method access (line 24) | func (r *Runner) access(ctx context.Context, path string, mode uint32) e... method unTestOwnOrGrp (line 31) | func (r *Runner) unTestOwnOrGrp(ctx context.Context, op syntax.UnTestOpe... FILE: interp/runner.go constant shellReplyPS3Var (line 34) | shellReplyPS3Var = "PS3" constant shellDefaultPS3 (line 36) | shellDefaultPS3 = "#? " constant shellReplyVar (line 39) | shellReplyVar = "REPLY" constant fifoNamePrefix (line 41) | fifoNamePrefix = "sh-interp-" method fillExpandConfig (line 44) | func (r *Runner) fillExpandConfig(ctx context.Context) { function catShortcutArg (line 159) | func catShortcutArg(stmt *syntax.Stmt) *syntax.Word { method updateExpandOpts (line 173) | func (r *Runner) updateExpandOpts() { method expandErr (line 189) | func (r *Runner) expandErr(err error) { method arithm (line 207) | func (r *Runner) arithm(expr syntax.ArithmExpr) int { method fields (line 213) | func (r *Runner) fields(words ...*syntax.Word) []string { method literal (line 219) | func (r *Runner) literal(word *syntax.Word) string { method document (line 225) | func (r *Runner) document(word *syntax.Word) string { method pattern (line 231) | func (r *Runner) pattern(word *syntax.Word) string { type expandEnv (line 238) | type expandEnv struct method Get (line 244) | func (e expandEnv) Get(name string) expand.Variable { method Set (line 248) | func (e expandEnv) Set(name string, vr expand.Variable) error { method Each (line 253) | func (e expandEnv) Each(fn func(name string, vr expand.Variable) bool) { method handlerCtx (line 259) | func (r *Runner) handlerCtx(ctx context.Context, kind handlerKind, pos s... method out (line 275) | func (r *Runner) out(s string) { method outf (line 279) | func (r *Runner) outf(format string, a ...any) { method errf (line 283) | func (r *Runner) errf(format string, a ...any) { method stop (line 287) | func (r *Runner) stop(ctx context.Context) bool { method stmt (line 302) | func (r *Runner) stmt(ctx context.Context, st *syntax.Stmt) { method stmtSync (line 329) | func (r *Runner) stmtSync(ctx context.Context, st *syntax.Stmt) { method cmd (line 367) | func (r *Runner) cmd(ctx context.Context, cm syntax.Command) { method trapCallback (line 812) | func (r *Runner) trapCallback(ctx context.Context, callback, name string) { method flattenAssigns (line 836) | func (r *Runner) flattenAssigns(args []*syntax.Assign) iter.Seq[*syntax.... function match (line 867) | func match(pat, name string) bool { function elapsedString (line 873) | func elapsedString(d time.Duration, posix bool) string { method stmts (line 882) | func (r *Runner) stmts(ctx context.Context, stmts []*syntax.Stmt) { method hdocReader (line 888) | func (r *Runner) hdocReader(rd *syntax.Redirect) (*os.File, error) { method redir (line 939) | func (r *Runner) redir(ctx context.Context, rd *syntax.Redirect) (io.Clo... method loopStmtsBroken (line 1034) | func (r *Runner) loopStmtsBroken(ctx context.Context, stmts []*syntax.St... method call (line 1052) | func (r *Runner) call(ctx context.Context, pos syntax.Pos, args []string) { method exec (line 1094) | func (r *Runner) exec(ctx context.Context, pos syntax.Pos, args []string) { method open (line 1098) | func (r *Runner) open(ctx context.Context, path string, flags int, mode ... method stat (line 1127) | func (r *Runner) stat(ctx context.Context, name string) (fs.FileInfo, er... method lstat (line 1132) | func (r *Runner) lstat(ctx context.Context, name string) (fs.FileInfo, e... FILE: interp/test.go method bashTest (line 19) | func (r *Runner) bashTest(ctx context.Context, expr syntax.TestExpr, cla... method binTest (line 61) | func (r *Runner) binTest(ctx context.Context, op syntax.BinTestOperator,... method statMode (line 126) | func (r *Runner) statMode(ctx context.Context, name string, mode os.File... constant access_R_OK (line 133) | access_R_OK = 0x4 constant access_W_OK (line 134) | access_W_OK = 0x2 constant access_X_OK (line 135) | access_X_OK = 0x1 method unTest (line 138) | func (r *Runner) unTest(ctx context.Context, op syntax.UnTestOperator, x... FILE: interp/test_classic.go constant illegalTok (line 12) | illegalTok = 0 type testParser (line 14) | type testParser struct method errf (line 22) | func (p *testParser) errf(format string, a ...any) { method next (line 26) | func (p *testParser) next() { method followWord (line 36) | func (p *testParser) followWord(fval string) *syntax.Word { method classicTest (line 47) | func (p *testParser) classicTest(fval string, pastAndOr bool) syntax.T... method testExprBase (line 78) | func (p *testParser) testExprBase(fval string) syntax.TestExpr { function testUnaryOp (line 116) | func testUnaryOp(val string) syntax.UnTestOperator { function testBinaryOp (line 176) | func testBinaryOp(val string) syntax.BinTestOperator { FILE: interp/trace.go type tracer (line 14) | type tracer struct method string (line 35) | func (t *tracer) string(s string) { method stringf (line 47) | func (t *tracer) stringf(f string, a ...any) { method expr (line 57) | func (t *tracer) expr(x syntax.Node) { method flush (line 72) | func (t *tracer) flush() { method newLineFlush (line 82) | func (t *tracer) newLineFlush() { method call (line 96) | func (t *tracer) call(cmd string, args ...string) { method tracer (line 21) | func (r *Runner) tracer() *tracer { FILE: interp/unexported_test.go function TestElapsedString (line 11) | func TestElapsedString(t *testing.T) { FILE: interp/unix_test.go function TestRunnerTerminalStdIO (line 21) | func TestRunnerTerminalStdIO(t *testing.T) { function TestRunnerTerminalExec (line 84) | func TestRunnerTerminalExec(t *testing.T) { function shortPathName (line 153) | func shortPathName(path string) (string, error) { FILE: interp/vars.go function newOverlayEnviron (line 22) | func newOverlayEnviron(parent expand.Environ, background bool) *overlayE... type overlayEnviron (line 37) | type overlayEnviron struct method normalize (line 63) | func (o *overlayEnviron) normalize(name string) string { method Get (line 70) | func (o *overlayEnviron) Get(name string) expand.Variable { method Set (line 81) | func (o *overlayEnviron) Set(name string, vr expand.Variable) error { method Each (line 118) | func (o *overlayEnviron) Each(f func(name string, vr expand.Variable) ... type namedVariable (line 53) | type namedVariable struct function execEnv (line 129) | func execEnv(env expand.Environ) []string { method lookupVar (line 151) | func (r *Runner) lookupVar(name string) expand.Variable { method envGet (line 210) | func (r *Runner) envGet(name string) string { method delVar (line 214) | func (r *Runner) delVar(name string) { method setVarString (line 222) | func (r *Runner) setVarString(name, value string) { method setVar (line 226) | func (r *Runner) setVar(name string, vr expand.Variable) { method setVarWithIndex (line 237) | func (r *Runner) setVarWithIndex(prev expand.Variable, name string, inde... method setFunc (line 302) | func (r *Runner) setFunc(name string, body *syntax.Stmt) { function stringIndex (line 309) | func stringIndex(index syntax.ArithmExpr) bool { method assignVal (line 323) | func (r *Runner) assignVal(prev expand.Variable, as *syntax.Assign, valT... FILE: interp/windows_test.go function shortPathName (line 14) | func shortPathName(path string) (string, error) { FILE: moreinterp/coreutils/coreutils.go function ExecHandler (line 61) | func ExecHandler(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { FILE: moreinterp/coreutils/coreutils_test.go function TestExecHandler (line 17) | func TestExecHandler(t *testing.T) { FILE: moreinterp/coreutils/error.go type Error (line 6) | type Error struct method Error (line 15) | func (err *Error) Error() string { method Unwrap (line 19) | func (err *Error) Unwrap() error { FILE: pattern/example_test.go function ExampleRegexp (line 13) | func ExampleRegexp() { function ExampleQuoteMeta (line 33) | func ExampleQuoteMeta() { FILE: pattern/pattern.go type Mode (line 21) | type Mode type SyntaxError (line 23) | type SyntaxError struct method Error (line 28) | func (e SyntaxError) Error() string { return e.msg } method Unwrap (line 30) | func (e SyntaxError) Unwrap() error { return e.err } type NegExtGlobGroup (line 34) | type NegExtGlobGroup struct type NegExtGlobError (line 42) | type NegExtGlobError struct method Error (line 46) | func (e *NegExtGlobError) Error() string { constant Shortest (line 55) | Shortest Mode = 1 << iota constant Filenames (line 56) | Filenames constant EntireString (line 57) | EntireString constant NoGlobCase (line 58) | NoGlobCase constant NoGlobStar (line 59) | NoGlobStar constant GlobLeadingDot (line 60) | GlobLeadingDot constant ExtendedOperators (line 61) | ExtendedOperators function Regexp (line 73) | func Regexp(pat string, mode Mode) (string, error) { type stringLexer (line 132) | type stringLexer struct method next (line 137) | func (sl *stringLexer) next() byte { method last (line 146) | func (sl *stringLexer) last() byte { method peekNext (line 153) | func (sl *stringLexer) peekNext() byte { method peekRest (line 160) | func (sl *stringLexer) peekRest() string { function regexpNext (line 164) | func regexpNext(sb *strings.Builder, sl *stringLexer, mode Mode) error { function charClass (line 328) | func charClass(s string) (string, error) { function HasMeta (line 361) | func HasMeta(pat string, mode Mode) bool { function QuoteMeta (line 379) | func QuoteMeta(pat string, mode Mode) string { FILE: pattern/pattern_test.go function TestRegexp (line 166) | func TestRegexp(t *testing.T) { function TestMeta (line 209) | func TestMeta(t *testing.T) { FILE: shell/example_test.go function ExampleExpand (line 12) | func ExampleExpand() { function ExampleFields (line 34) | func ExampleFields() { FILE: shell/expand.go function Expand (line 26) | func Expand(s string, env func(string) string) (string, error) { function Fields (line 52) | func Fields(s string, env func(string) string) ([]string, error) { FILE: shell/expand_test.go function strEnviron (line 15) | func strEnviron(pairs ...string) func(string) string { function TestExpand (line 43) | func TestExpand(t *testing.T) { function TestUnexpectedCmdSubst (line 59) | func TestUnexpectedCmdSubst(t *testing.T) { function TestFields (line 110) | func TestFields(t *testing.T) { FILE: syntax/bench_test.go function BenchmarkParse (line 12) | func BenchmarkParse(b *testing.B) { function BenchmarkPrint (line 39) | func BenchmarkPrint(b *testing.B) { FILE: syntax/braces.go function SplitBraces (line 29) | func SplitBraces(word *Word) bool { FILE: syntax/example_test.go function Example (line 14) | func Example() { function ExampleWord (line 28) | func ExampleWord() { function ExampleCommand (line 57) | func ExampleCommand() { function ExampleNewParser_options (line 77) | func ExampleNewParser_options() { function ExampleQuote (line 102) | func ExampleQuote() { function ExampleWalk (line 137) | func ExampleWalk() { function ExampleDebugPrint (line 154) | func ExampleDebugPrint() { FILE: syntax/filetests_test.go function lit (line 12) | func lit(s string) *Lit { return &Lit{Value: s} } function lits (line 13) | func lits(strs ...string) []*Lit { function word (line 20) | func word(ps ...WordPart) *Word { return &Word{Parts: ps} } function litWord (line 21) | func litWord(s string) *Word { return word(lit(s)) } function litWords (line 22) | func litWords(strs ...string) []*Word { function litAssigns (line 30) | func litAssigns(pairs ...string) []*Assign { function call (line 45) | func call(words ...*Word) *CallExpr { return &CallExpr{Args: words} } function litCall (line 46) | func litCall(strs ...string) *CallExpr { return call(litWords(strs...)..... function stmt (line 48) | func stmt(cmd Command) *Stmt { return &Stmt{Cmd: cmd} } function stmts (line 49) | func stmts(cmds ...Command) []*Stmt { function litStmt (line 57) | func litStmt(strs ...string) *Stmt { return stmt(litCall(strs...)) } function litStmts (line 58) | func litStmts(strs ...string) []*Stmt { function sglQuoted (line 66) | func sglQuoted(s string) *SglQuoted { return &SglQuoted{Value: s} } function sglDQuoted (line 67) | func sglDQuoted(s string) *SglQuoted { return &SglQuoted{Dollar: t... function dblQuoted (line 68) | func dblQuoted(ps ...WordPart) *DblQuoted { return &DblQuoted{Parts: ps} } function dblDQuoted (line 69) | func dblDQuoted(ps ...WordPart) *DblQuoted { return &DblQuoted{Dollar: t... function block (line 70) | func block(sts ...*Stmt) *Block { return &Block{Stmts: sts} } function subshell (line 71) | func subshell(sts ...*Stmt) *Subshell { return &Subshell{Stmts: sts} } function arithmExp (line 72) | func arithmExp(e ArithmExpr) *ArithmExp { return &ArithmExp{X: e} } function arithmExpBr (line 73) | func arithmExpBr(e ArithmExpr) *ArithmExp { return &ArithmExp{Bracket: ... function arithmCmd (line 74) | func arithmCmd(e ArithmExpr) *ArithmCmd { return &ArithmCmd{X: e} } function parenArit (line 75) | func parenArit(e ArithmExpr) *ParenArithm { return &ParenArithm{X: e} } function parenTest (line 76) | func parenTest(e TestExpr) *ParenTest { return &ParenTest{X: e} } function cmdSubst (line 78) | func cmdSubst(sts ...*Stmt) *CmdSubst { return &CmdSubst{Stmts: sts} } function litParamExp (line 79) | func litParamExp(s string) *ParamExp { function letClause (line 83) | func letClause(exps ...ArithmExpr) *LetClause { function arrValues (line 87) | func arrValues(words ...*Word) *ArrayExpr { function fullProg (line 95) | func fullProg(v any) *File { type fileTestCase (line 124) | type fileTestCase struct method setForLangs (line 141) | func (c *fileTestCase) setForLangs(val any, langSets ...LangVariant) { function flipConfirm2 (line 137) | func flipConfirm2(langSet LangVariant) func(*fileTestCase) { function fileTest (line 158) | func fileTest(in []string, opts ...func(*fileTestCase)) fileTestCase { function langSkip (line 166) | func langSkip(langSets ...LangVariant) func(*fileTestCase) { function langFile (line 170) | func langFile(wantNode any, langSets ...LangVariant) func(*fileTestCase) { function langErr2 (line 176) | func langErr2(wantErr string, langSets ...LangVariant) func(*fileTestCas... type sanityChecker (line 5255) | type sanityChecker struct method checkPos (line 5261) | func (c sanityChecker) checkPos(node Node, pos Pos, strs ...string) { method visit (line 5299) | func (c sanityChecker) visit(node Node) bool { FILE: syntax/fuzz_test.go function FuzzQuote (line 15) | func FuzzQuote(f *testing.F) { function FuzzParsePrint (line 79) | func FuzzParsePrint(f *testing.F) { FILE: syntax/lexer.go function asciiLetter (line 12) | func asciiLetter[T rune | byte](r T) bool { function asciiDigit (line 16) | func asciiDigit[T rune | byte](r T) bool { function regOps (line 21) | func regOps(r rune) bool { function paramOps (line 30) | func paramOps(r rune) bool { function arithmOps (line 40) | func arithmOps(r rune) bool { function bquoteEscaped (line 49) | func bquoteEscaped(b byte) bool { constant escNewl (line 57) | escNewl rune = utf8.RuneSelf + 1 method rune (line 59) | func (p *Parser) rune() rune { method fill (line 148) | func (p *Parser) fill() (n int) { method nextKeepSpaces (line 186) | func (p *Parser) nextKeepSpaces() { method next (line 234) | func (p *Parser) next() { method extendedGlob (line 404) | func (p *Parser) extendedGlob() bool { method peek (line 429) | func (p *Parser) peek() byte { method peekTwo (line 439) | func (p *Parser) peekTwo() (byte, byte) { method regToken (line 454) | func (p *Parser) regToken(r rune) token { method dqToken (line 669) | func (p *Parser) dqToken(r rune) token { method paramToken (line 701) | func (p *Parser) paramToken(r rune) token { method arithmToken (line 795) | func (p *Parser) arithmToken(r rune) token { method newLit (line 953) | func (p *Parser) newLit(r rune) { method endLit (line 968) | func (p *Parser) endLit() (s string) { method isLitRedir (line 978) | func (p *Parser) isLitRedir() bool { function positionalRuneParam (line 986) | func positionalRuneParam[T rune | byte](r T) bool { function singleRuneParam (line 994) | func singleRuneParam[T rune | byte](r T) bool { function paramNameRune (line 1002) | func paramNameRune[T rune | byte](r T) bool { method advanceLitOther (line 1006) | func (p *Parser) advanceLitOther(r rune) { method zshNumRange (line 1048) | func (p *Parser) zshNumRange() bool { method advanceLitNone (line 1069) | func (p *Parser) advanceLitNone(r rune) { method advanceLitDquote (line 1124) | func (p *Parser) advanceLitDquote(r rune) { method advanceLitHdoc (line 1141) | func (p *Parser) advanceLitHdoc(r rune) { method quotedHdocWord (line 1209) | func (p *Parser) quotedHdocWord() *Word { method advanceLitRe (line 1256) | func (p *Parser) advanceLitRe(r rune) { function testUnaryOp (line 1286) | func testUnaryOp(val string) UnTestOperator { function testBinaryOp (line 1343) | func testBinaryOp(val string) BinTestOperator { FILE: syntax/nodes.go type Node (line 13) | type Node interface type File (line 24) | type File struct method Pos (line 31) | func (f *File) Pos() Pos { return stmtsPos(f.Stmts, f.Last) } method End (line 32) | func (f *File) End() Pos { return stmtsEnd(f.Stmts, f.Last) } function stmtsPos (line 34) | func stmtsPos(stmts []*Stmt, last []Comment) Pos { function stmtsEnd (line 51) | func stmtsEnd(stmts []*Stmt, last []Comment) Pos { type Pos (line 69) | type Pos struct method Offset (line 122) | func (p Pos) Offset() uint { method Line (line 134) | func (p Pos) Line() uint { return uint(p.lineCol >> colBitSize) } method Col (line 141) | func (p Pos) Col() uint { return uint(p.lineCol & colBitMask) } method String (line 143) | func (p Pos) String() string { method IsValid (line 165) | func (p Pos) IsValid() bool { method IsRecovered (line 173) | func (p Pos) IsRecovered() bool { return p == recoveredPos } method After (line 178) | func (p Pos) After(p2 Pos) bool { constant offsetRecovered (line 78) | offsetRecovered = math.MaxUint32 - 10 constant offsetMax (line 79) | offsetMax = math.MaxUint32 - 11 constant lineBitSize (line 84) | lineBitSize = 18 constant lineMax (line 85) | lineMax = (1 << lineBitSize) - 1 constant colBitSize (line 87) | colBitSize = 32 - lineBitSize constant colMax (line 88) | colMax = (1 << colBitSize) - 1 constant colBitMask (line 89) | colBitMask = colMax function NewPos (line 101) | func NewPos(offset, line, column uint) Pos { function posAddCol (line 185) | func posAddCol(p Pos, n int) Pos { function posMax (line 195) | func posMax(p1, p2 Pos) Pos { type Comment (line 203) | type Comment struct method Pos (line 208) | func (c *Comment) Pos() Pos { return c.Hash } method End (line 209) | func (c *Comment) End() Pos { return posAddCol(c.Hash, 1+len(c.Text)) } type Stmt (line 214) | type Stmt struct method Pos (line 227) | func (s *Stmt) Pos() Pos { return s.Position } method End (line 228) | func (s *Stmt) End() Pos { type Command (line 255) | type Command interface type Assign (line 288) | type Assign struct method Pos (line 297) | func (a *Assign) Pos() Pos { method End (line 304) | func (a *Assign) End() Pos { type Redirect (line 321) | type Redirect struct method Pos (line 329) | func (r *Redirect) Pos() Pos { method End (line 336) | func (r *Redirect) End() Pos { type CallExpr (line 348) | type CallExpr struct method commandNode (line 260) | func (*CallExpr) commandNode() {} method Pos (line 353) | func (c *CallExpr) Pos() Pos { method End (line 360) | func (c *CallExpr) End() Pos { type Subshell (line 369) | type Subshell struct method commandNode (line 266) | func (*Subshell) commandNode() {} method Pos (line 376) | func (s *Subshell) Pos() Pos { return s.Lparen } method End (line 377) | func (s *Subshell) End() Pos { return posAddCol(s.Rparen, 1) } type Block (line 381) | type Block struct method commandNode (line 265) | func (*Block) commandNode() {} method Pos (line 388) | func (b *Block) Pos() Pos { return b.Lbrace } method End (line 389) | func (b *Block) End() Pos { return posAddCol(b.Rbrace, 1) } type IfClause (line 392) | type IfClause struct method commandNode (line 261) | func (*IfClause) commandNode() {} method Pos (line 407) | func (c *IfClause) Pos() Pos { return c.Position } method End (line 408) | func (c *IfClause) End() Pos { return posAddCol(c.FiPos, 2) } type WhileClause (line 411) | type WhileClause struct method commandNode (line 262) | func (*WhileClause) commandNode() {} method Pos (line 421) | func (w *WhileClause) Pos() Pos { return w.WhilePos } method End (line 422) | func (w *WhileClause) End() Pos { return posAddCol(w.DonePos, 4) } type ForClause (line 426) | type ForClause struct method commandNode (line 263) | func (*ForClause) commandNode() {} method Pos (line 436) | func (f *ForClause) Pos() Pos { return f.ForPos } method End (line 437) | func (f *ForClause) End() Pos { return posAddCol(f.DonePos, 4) } type Loop (line 440) | type Loop interface type WordIter (line 451) | type WordIter struct method loopNode (line 445) | func (*WordIter) loopNode() {} method Pos (line 457) | func (w *WordIter) Pos() Pos { return w.Name.Pos() } method End (line 458) | func (w *WordIter) End() Pos { type CStyleLoop (line 469) | type CStyleLoop struct method loopNode (line 446) | func (*CStyleLoop) loopNode() {} method Pos (line 475) | func (c *CStyleLoop) Pos() Pos { return c.Lparen } method End (line 476) | func (c *CStyleLoop) End() Pos { return posAddCol(c.Rparen, 2) } type BinaryCmd (line 479) | type BinaryCmd struct method commandNode (line 267) | func (*BinaryCmd) commandNode() {} method Pos (line 485) | func (b *BinaryCmd) Pos() Pos { return b.X.Pos() } method End (line 486) | func (b *BinaryCmd) End() Pos { return b.Y.End() } type FuncDecl (line 489) | type FuncDecl struct method commandNode (line 268) | func (*FuncDecl) commandNode() {} method Pos (line 503) | func (f *FuncDecl) Pos() Pos { return f.Position } method End (line 504) | func (f *FuncDecl) End() Pos { return f.Body.End() } type Word (line 509) | type Word struct method Pos (line 513) | func (w *Word) Pos() Pos { return w.Parts[0].Pos() } method End (line 514) | func (w *Word) End() Pos { return w.Parts[len(w.Parts)-1].End() } method Lit (line 522) | func (w *Word) Lit() string { method arithmExprNode (line 743) | func (*Word) arithmExprNode() {} method testExprNode (line 870) | func (*Word) testExprNode() {} type WordPart (line 542) | type WordPart interface type Lit (line 562) | type Lit struct method wordPartNode (line 547) | func (*Lit) wordPartNode() {} method Pos (line 567) | func (l *Lit) Pos() Pos { return l.ValuePos } method End (line 568) | func (l *Lit) End() Pos { return l.ValueEnd } type SglQuoted (line 571) | type SglQuoted struct method wordPartNode (line 548) | func (*SglQuoted) wordPartNode() {} method Pos (line 577) | func (q *SglQuoted) Pos() Pos { return q.Left } method End (line 578) | func (q *SglQuoted) End() Pos { return posAddCol(q.Right, 1) } type DblQuoted (line 581) | type DblQuoted struct method wordPartNode (line 549) | func (*DblQuoted) wordPartNode() {} method Pos (line 587) | func (q *DblQuoted) Pos() Pos { return q.Left } method End (line 588) | func (q *DblQuoted) End() Pos { return posAddCol(q.Right, 1) } type CmdSubst (line 591) | type CmdSubst struct method wordPartNode (line 551) | func (*CmdSubst) wordPartNode() {} method Pos (line 602) | func (c *CmdSubst) Pos() Pos { return c.Left } method End (line 603) | func (c *CmdSubst) End() Pos { return posAddCol(c.Right, 1) } type ParamExp (line 606) | type ParamExp struct method wordPartNode (line 550) | func (*ParamExp) wordPartNode() {} method simple (line 649) | func (p *ParamExp) simple() bool { method Pos (line 657) | func (p *ParamExp) Pos() Pos { method End (line 663) | func (p *ParamExp) End() Pos { method nakedIndex (line 674) | func (p *ParamExp) nakedIndex() bool { type Slice (line 684) | type Slice struct type Replace (line 689) | type Replace struct type Expansion (line 696) | type Expansion struct type ArithmExp (line 702) | type ArithmExp struct method wordPartNode (line 552) | func (*ArithmExp) wordPartNode() {} method Pos (line 710) | func (a *ArithmExp) Pos() Pos { return a.Left } method End (line 711) | func (a *ArithmExp) End() Pos { type ArithmCmd (line 721) | type ArithmCmd struct method commandNode (line 269) | func (*ArithmCmd) commandNode() {} method Pos (line 728) | func (a *ArithmCmd) Pos() Pos { return a.Left } method End (line 729) | func (a *ArithmCmd) End() Pos { return posAddCol(a.Right, 2) } type ArithmExpr (line 734) | type ArithmExpr interface type BinaryArithm (line 753) | type BinaryArithm struct method arithmExprNode (line 739) | func (*BinaryArithm) arithmExprNode() {} method Pos (line 759) | func (b *BinaryArithm) Pos() Pos { return b.X.Pos() } method End (line 760) | func (b *BinaryArithm) End() Pos { return b.Y.End() } type UnaryArithm (line 767) | type UnaryArithm struct method arithmExprNode (line 740) | func (*UnaryArithm) arithmExprNode() {} method Pos (line 774) | func (u *UnaryArithm) Pos() Pos { method End (line 781) | func (u *UnaryArithm) End() Pos { type ParenArithm (line 789) | type ParenArithm struct method arithmExprNode (line 741) | func (*ParenArithm) arithmExprNode() {} method Pos (line 795) | func (p *ParenArithm) Pos() Pos { return p.Lparen } method End (line 796) | func (p *ParenArithm) End() Pos { return posAddCol(p.Rparen, 1) } type FlagsArithm (line 802) | type FlagsArithm struct method arithmExprNode (line 742) | func (*FlagsArithm) arithmExprNode() {} method Pos (line 807) | func (z *FlagsArithm) Pos() Pos { return posAddCol(z.Flags.Pos(), -1) } method End (line 808) | func (z *FlagsArithm) End() Pos { type CaseClause (line 816) | type CaseClause struct method commandNode (line 264) | func (*CaseClause) commandNode() {} method Pos (line 825) | func (c *CaseClause) Pos() Pos { return c.Case } method End (line 826) | func (c *CaseClause) End() Pos { return posAddCol(c.Esac, 4) } type CaseItem (line 829) | type CaseItem struct method Pos (line 839) | func (c *CaseItem) Pos() Pos { return c.Patterns[0].Pos() } method End (line 840) | func (c *CaseItem) End() Pos { type TestClause (line 850) | type TestClause struct method commandNode (line 270) | func (*TestClause) commandNode() {} method Pos (line 856) | func (t *TestClause) Pos() Pos { return t.Left } method End (line 857) | func (t *TestClause) End() Pos { return posAddCol(t.Right, 2) } type TestExpr (line 862) | type TestExpr interface type BinaryTest (line 873) | type BinaryTest struct method testExprNode (line 867) | func (*BinaryTest) testExprNode() {} method Pos (line 879) | func (b *BinaryTest) Pos() Pos { return b.X.Pos() } method End (line 880) | func (b *BinaryTest) End() Pos { return b.Y.End() } type UnaryTest (line 884) | type UnaryTest struct method testExprNode (line 868) | func (*UnaryTest) testExprNode() {} method Pos (line 890) | func (u *UnaryTest) Pos() Pos { return u.OpPos } method End (line 891) | func (u *UnaryTest) End() Pos { return u.X.End() } type ParenTest (line 894) | type ParenTest struct method testExprNode (line 869) | func (*ParenTest) testExprNode() {} method Pos (line 900) | func (p *ParenTest) Pos() Pos { return p.Lparen } method End (line 901) | func (p *ParenTest) End() Pos { return posAddCol(p.Rparen, 1) } type DeclClause (line 909) | type DeclClause struct method commandNode (line 271) | func (*DeclClause) commandNode() {} method Pos (line 916) | func (d *DeclClause) Pos() Pos { return d.Variant.Pos() } method End (line 917) | func (d *DeclClause) End() Pos { type ArrayExpr (line 927) | type ArrayExpr struct method Pos (line 934) | func (a *ArrayExpr) Pos() Pos { return a.Lparen } method End (line 935) | func (a *ArrayExpr) End() Pos { return posAddCol(a.Rparen, 1) } type ArrayElem (line 942) | type ArrayElem struct method Pos (line 948) | func (a *ArrayElem) Pos() Pos { method End (line 955) | func (a *ArrayElem) End() Pos { type ExtGlob (line 971) | type ExtGlob struct method wordPartNode (line 554) | func (*ExtGlob) wordPartNode() {} method Pos (line 977) | func (e *ExtGlob) Pos() Pos { return e.OpPos } method End (line 978) | func (e *ExtGlob) End() Pos { return posAddCol(e.Pattern.End(), 1) } type ProcSubst (line 983) | type ProcSubst struct method wordPartNode (line 553) | func (*ProcSubst) wordPartNode() {} method Pos (line 991) | func (s *ProcSubst) Pos() Pos { return s.OpPos } method End (line 992) | func (s *ProcSubst) End() Pos { return posAddCol(s.Rparen, 1) } type TimeClause (line 998) | type TimeClause struct method commandNode (line 273) | func (*TimeClause) commandNode() {} method Pos (line 1004) | func (c *TimeClause) Pos() Pos { return c.Time } method End (line 1005) | func (c *TimeClause) End() Pos { type CoprocClause (line 1015) | type CoprocClause struct method commandNode (line 274) | func (*CoprocClause) commandNode() {} method Pos (line 1021) | func (c *CoprocClause) Pos() Pos { return c.Coproc } method End (line 1022) | func (c *CoprocClause) End() Pos { return c.Stmt.End() } type LetClause (line 1027) | type LetClause struct method commandNode (line 272) | func (*LetClause) commandNode() {} method Pos (line 1032) | func (l *LetClause) Pos() Pos { return l.Let } method End (line 1033) | func (l *LetClause) End() Pos { return l.Exprs[len(l.Exprs)-1].End() } type BraceExp (line 1038) | type BraceExp struct method wordPartNode (line 555) | func (*BraceExp) wordPartNode() {} method Pos (line 1043) | func (b *BraceExp) Pos() Pos { method End (line 1047) | func (b *BraceExp) End() Pos { type TestDecl (line 1052) | type TestDecl struct method commandNode (line 275) | func (*TestDecl) commandNode() {} method Pos (line 1058) | func (f *TestDecl) Pos() Pos { return f.Position } method End (line 1059) | func (f *TestDecl) End() Pos { return f.Body.End() } function wordLastEnd (line 1061) | func wordLastEnd(ws []*Word) Pos { FILE: syntax/parser.go type ParserOption (line 19) | type ParserOption function KeepComments (line 23) | func KeepComments(enabled bool) ParserOption { type LangVariant (line 31) | type LangVariant method String (line 121) | func (l LangVariant) String() string { method Set (line 139) | func (l *LangVariant) Set(s string) error { method in (line 159) | func (l LangVariant) in(l2 LangVariant) bool { method count (line 163) | func (l LangVariant) count() int { method index (line 167) | func (l LangVariant) index() int { method bits (line 171) | func (l LangVariant) bits() iter.Seq[LangVariant] { constant LangBash (line 44) | LangBash LangVariant = 1 << iota constant LangPOSIX (line 50) | LangPOSIX constant LangMirBSDKorn (line 60) | LangMirBSDKorn constant LangBats (line 67) | LangBats constant LangZsh (line 77) | LangZsh constant LangAuto (line 84) | LangAuto constant langBashLegacy (line 88) | langBashLegacy LangVariant = 0 constant langResolvedVariants (line 92) | langResolvedVariants = LangBash | LangPOSIX | LangMirBSDKorn | LangBats ... constant langResolvedVariantsCount (line 97) | langResolvedVariantsCount = 5 constant langBashLike (line 100) | langBashLike = LangBash | LangBats function Variant (line 108) | func Variant(l LangVariant) ParserOption { function StopAt (line 197) | func StopAt(word string) ParserOption { function RecoverErrors (line 223) | func RecoverErrors(maximum int) ParserOption { function NewParser (line 228) | func NewParser(options ...ParserOption) *Parser { type wrappedReader (line 295) | type wrappedReader struct method Read (line 304) | func (w *wrappedReader) Read(p []byte) (n int, err error) { type Parser (line 480) | type Parser struct method Parse (line 244) | func (p *Parser) Parse(r io.Reader, name string) (*File, error) { method Stmts (line 262) | func (p *Parser) Stmts(r io.Reader, fn func(*Stmt) bool) error { method StmtsSeq (line 275) | func (p *Parser) StmtsSeq(r io.Reader) iter.Seq2[*Stmt, error] { method Interactive (line 328) | func (p *Parser) Interactive(r io.Reader, fn func([]*Stmt) bool) error { method InteractiveSeq (line 365) | func (p *Parser) InteractiveSeq(r io.Reader) iter.Seq2[[]*Stmt, error] { method Words (line 398) | func (p *Parser) Words(r io.Reader, fn func(*Word) bool) error { method WordsSeq (line 419) | func (p *Parser) WordsSeq(r io.Reader) iter.Seq2[*Word, error] { method Document (line 452) | func (p *Parser) Document(r io.Reader) (*Word, error) { method Arithmetic (line 467) | func (p *Parser) Arithmetic(r io.Reader) (ArithmExpr, error) { method Incomplete (line 553) | func (p *Parser) Incomplete() bool { method reset (line 561) | func (p *Parser) reset() { method nextPos (line 583) | func (p *Parser) nextPos() Pos { method lit (line 597) | func (p *Parser) lit(pos Pos, val string) *Lit { method wordAnyNumber (line 614) | func (p *Parser) wordAnyNumber() *Word { method wordOne (line 625) | func (p *Parser) wordOne(part WordPart) *Word { method call (line 637) | func (p *Parser) call(w *Word) *CallExpr { method preNested (line 692) | func (p *Parser) preNested(quote quoteState) (s saveState) { method postNested (line 698) | func (p *Parser) postNested(s saveState) { method unquotedWordBytes (line 702) | func (p *Parser) unquotedWordBytes(w *Word) ([]byte, bool) { method unquotedWordPart (line 711) | func (p *Parser) unquotedWordPart(buf []byte, wp WordPart, quotes bool... method doHeredocs (line 736) | func (p *Parser) doHeredocs() { method got (line 772) | func (p *Parser) got(tok token) bool { method gotRsrv (line 780) | func (p *Parser) gotRsrv(val string) (Pos, bool) { method recoverError (line 789) | func (p *Parser) recoverError() bool { method followErr (line 813) | func (p *Parser) followErr(pos Pos, left, right any) { method followErrExp (line 817) | func (p *Parser) followErrExp(pos Pos, left any) { method follow (line 821) | func (p *Parser) follow(lpos Pos, left string, tok token) { method followRsrv (line 827) | func (p *Parser) followRsrv(lpos Pos, left, val string) Pos { method followStmts (line 838) | func (p *Parser) followStmts(left string, lpos Pos, stops ...string) (... method followWordTok (line 867) | func (p *Parser) followWordTok(tok token, pos Pos) *Word { method stmtEnd (line 878) | func (p *Parser) stmtEnd(n Node, start, end string) Pos { method quoteErr (line 889) | func (p *Parser) quoteErr(lpos Pos, quote token) { method matchingErr (line 893) | func (p *Parser) matchingErr(lpos Pos, left, right token) { method matched (line 897) | func (p *Parser) matched(lpos Pos, left, right token) Pos { method errPass (line 908) | func (p *Parser) errPass(err error) { method posErr (line 1021) | func (p *Parser) posErr(pos Pos, format string, args ...any) { method curErr (line 1035) | func (p *Parser) curErr(format string, args ...any) { method checkLang (line 1039) | func (p *Parser) checkLang(pos Pos, langSet LangVariant, format string... method stmts (line 1057) | func (p *Parser) stmts(yield func(*Stmt, error) bool, stops ...string) { method stmtList (line 1106) | func (p *Parser) stmtList(stops ...string) ([]*Stmt, []Comment) { method invalidStmtStart (line 1140) | func (p *Parser) invalidStmtStart() { method getWord (line 1151) | func (p *Parser) getWord() *Word { method getLit (line 1158) | func (p *Parser) getLit() *Lit { method wordParts (line 1167) | func (p *Parser) wordParts(wps []WordPart) []WordPart { method ensureNoNested (line 1189) | func (p *Parser) ensureNoNested(pos Pos) { method wordPart (line 1195) | func (p *Parser) wordPart() WordPart { method cmdSubst (line 1392) | func (p *Parser) cmdSubst() *CmdSubst { method dblQuoted (line 1402) | func (p *Parser) dblQuoted() *DblQuoted { method paramExp (line 1430) | func (p *Parser) paramExp() *ParamExp { method nestedParameterStart (line 1618) | func (p *Parser) nestedParameterStart(pe *ParamExp) (left token, quote... method paramExpParameter (line 1650) | func (p *Parser) paramExpParameter(pe *ParamExp) *ParamExp { method paramExpExp (line 1725) | func (p *Parser) paramExpExp() *Expansion { method eitherIndex (line 1750) | func (p *Parser) eitherIndex() ArithmExpr { method zshSubFlags (line 1764) | func (p *Parser) zshSubFlags() *FlagsArithm { method stopToken (line 1790) | func (p *Parser) stopToken() bool { method backquoteEnd (line 1801) | func (p *Parser) backquoteEnd() bool { method hasValidIdent (line 1833) | func (p *Parser) hasValidIdent() bool { method getAssign (line 1850) | func (p *Parser) getAssign(needEqual bool) *Assign { method peekRedir (line 1970) | func (p *Parser) peekRedir() bool { method doRedirect (line 1980) | func (p *Parser) doRedirect(s *Stmt) { method getStmt (line 2031) | func (p *Parser) getStmt(readEnd, binCmd, fnBody bool) *Stmt { method gotStmtPipe (line 2102) | func (p *Parser) gotStmtPipe(s *Stmt, binCmd bool) *Stmt { method subshell (line 2288) | func (p *Parser) subshell(s *Stmt) { method arithmExpCmd (line 2298) | func (p *Parser) arithmExpCmd(s *Stmt) { method block (line 2311) | func (p *Parser) block(s *Stmt) { method ifClause (line 2325) | func (p *Parser) ifClause(s *Stmt) { method whileClause (line 2361) | func (p *Parser) whileClause(s *Stmt, until bool) { method forClause (line 2377) | func (p *Parser) forClause(s *Stmt) { method loop (line 2399) | func (p *Parser) loop(fpos Pos) Loop { method wordIter (line 2423) | func (p *Parser) wordIter(ftok string, fpos Pos) *WordIter { method selectClause (line 2451) | func (p *Parser) selectClause(s *Stmt) { method caseClause (line 2461) | func (p *Parser) caseClause(s *Stmt) { method caseItems (line 2484) | func (p *Parser) caseItems(stop string) (items []*CaseItem) { method testClause (line 2546) | func (p *Parser) testClause(s *Stmt) { method testExprBinary (line 2561) | func (p *Parser) testExprBinary(pastAndOr bool) TestExpr { method testExprUnary (line 2621) | func (p *Parser) testExprUnary() TestExpr { method declClause (line 2675) | func (p *Parser) declClause(s *Stmt) { method timeClause (line 2715) | func (p *Parser) timeClause(s *Stmt) { method coprocClause (line 2725) | func (p *Parser) coprocClause(s *Stmt) { method letClause (line 2754) | func (p *Parser) letClause(s *Stmt) { method bashFuncDecl (line 2772) | func (p *Parser) bashFuncDecl(s *Stmt) { method testDecl (line 2800) | func (p *Parser) testDecl(s *Stmt) { method callExpr (line 2812) | func (p *Parser) callExpr(s *Stmt, w *Word, assign bool) { method funcDecl (line 2893) | func (p *Parser) funcDecl(s *Stmt, pos Pos, long, withParens bool, nam... constant bufSize (line 559) | bufSize = 1 << 10 type wordAlloc (line 609) | type wordAlloc struct type quoteState (line 648) | type quoteState constant noState (line 652) | noState quoteState = 1 << iota constant runeByRune (line 656) | runeByRune constant unquotedWordCont (line 660) | unquotedWordCont constant subCmd (line 662) | subCmd constant subCmdBckquo (line 663) | subCmdBckquo constant dblQuotes (line 664) | dblQuotes constant hdocWord (line 665) | hdocWord constant hdocBody (line 666) | hdocBody constant hdocBodyTabs (line 667) | hdocBodyTabs constant arithmExpr (line 668) | arithmExpr constant arithmExprLet (line 669) | arithmExprLet constant arithmExprCmd (line 670) | arithmExprCmd constant testExpr (line 671) | testExpr constant testExprRegexp (line 672) | testExprRegexp constant switchCase (line 673) | switchCase constant paramExpArithm (line 674) | paramExpArithm constant paramExpRepl (line 675) | paramExpRepl constant paramExpExp (line 676) | paramExpExp constant arrayElems (line 677) | arrayElems constant allKeepSpaces (line 679) | allKeepSpaces = runeByRune | paramExpRepl | dblQuotes | hdocBody | constant allRegTokens (line 681) | allRegTokens = noState | unquotedWordCont | subCmd | subCmdBckquo | hdoc... constant allArithmExpr (line 683) | allArithmExpr = arithmExpr | arithmExprLet | arithmExprCmd | paramExpArithm constant allParamExp (line 684) | allParamExp = paramExpArithm | paramExpRepl | paramExpExp type saveState (line 687) | type saveState struct type noQuote (line 797) | type noQuote method Format (line 799) | func (s noQuote) Format(f fmt.State, verb rune) { method Format (line 803) | func (t token) Format(f fmt.State, verb rune) { function IsIncomplete (line 921) | func IsIncomplete(err error) bool { function IsKeyword (line 931) | func IsKeyword(word string) bool { type ParseError (line 964) | type ParseError struct method Error (line 972) | func (e ParseError) Error() string { type LangError (line 982) | type LangError struct method Error (line 996) | func (e LangError) Error() string { function ValidName (line 1806) | func ValidName(val string) bool { function numberLiteral (line 1821) | func numberLiteral[T string | []byte](val T) bool { function isBashCompoundCommand (line 2700) | func isBashCompoundCommand(tok token, val string) bool { FILE: syntax/parser_arithm.go method arithmExpr (line 5) | func (p *Parser) arithmExpr(compact bool) ArithmExpr { method arithmExprComma (line 11) | func (p *Parser) arithmExprComma(compact bool) ArithmExpr { method arithmExprAssign (line 15) | func (p *Parser) arithmExprAssign(compact bool) ArithmExpr { method arithmExprTernary (line 46) | func (p *Parser) arithmExprTernary(compact bool) ArithmExpr { method arithmExprLor (line 86) | func (p *Parser) arithmExprLor(compact bool) ArithmExpr { method arithmExprLand (line 90) | func (p *Parser) arithmExprLand(compact bool) ArithmExpr { method arithmExprBor (line 94) | func (p *Parser) arithmExprBor(compact bool) ArithmExpr { method arithmExprBxor (line 98) | func (p *Parser) arithmExprBxor(compact bool) ArithmExpr { method arithmExprBand (line 102) | func (p *Parser) arithmExprBand(compact bool) ArithmExpr { method arithmExprEquality (line 106) | func (p *Parser) arithmExprEquality(compact bool) ArithmExpr { method arithmExprComparison (line 110) | func (p *Parser) arithmExprComparison(compact bool) ArithmExpr { method arithmExprShift (line 114) | func (p *Parser) arithmExprShift(compact bool) ArithmExpr { method arithmExprAddition (line 118) | func (p *Parser) arithmExprAddition(compact bool) ArithmExpr { method arithmExprMultiplication (line 122) | func (p *Parser) arithmExprMultiplication(compact bool) ArithmExpr { method arithmExprPower (line 126) | func (p *Parser) arithmExprPower(compact bool) ArithmExpr { method arithmExprUnary (line 152) | func (p *Parser) arithmExprUnary(compact bool) ArithmExpr { method arithmExprValue (line 169) | func (p *Parser) arithmExprValue(compact bool) ArithmExpr { method nextArith (line 246) | func (p *Parser) nextArith(compact bool) bool { method nextArithOp (line 257) | func (p *Parser) nextArithOp(compact bool) { method arithmExprBinary (line 266) | func (p *Parser) arithmExprBinary(compact bool, nextOp func(bool) Arithm... function isArithName (line 301) | func isArithName(left ArithmExpr) bool { method followArithm (line 316) | func (p *Parser) followArithm(ftok token, fpos Pos) ArithmExpr { method peekArithmEnd (line 324) | func (p *Parser) peekArithmEnd() bool { method arithmMatchingErr (line 328) | func (p *Parser) arithmMatchingErr(pos Pos, left, right token) { method matchedArithm (line 348) | func (p *Parser) matchedArithm(lpos Pos, left, right token) { method arithmEnd (line 354) | func (p *Parser) arithmEnd(ltok token, lpos Pos, old saveState) Pos { FILE: syntax/parser_linux_test.go function killCommandOnTestExit (line 11) | func killCommandOnTestExit(cmd *exec.Cmd) { FILE: syntax/parser_other_test.go function killCommandOnTestExit (line 10) | func killCommandOnTestExit(cmd *exec.Cmd) { FILE: syntax/parser_test.go function TestParseFiles (line 26) | func TestParseFiles(t *testing.T) { function TestParseErr (line 61) | func TestParseErr(t *testing.T) { function TestParseConfirm (line 88) | func TestParseConfirm(t *testing.T) { function TestParseBashKeepComments (line 133) | func TestParseBashKeepComments(t *testing.T) { function TestParsePosOverflow (line 147) | func TestParsePosOverflow(t *testing.T) { function TestMain (line 209) | func TestMain(m *testing.M) { type externalShell (line 240) | type externalShell struct function skipExternal (line 249) | func skipExternal(tb testing.TB, message string) { function cmdContains (line 283) | func cmdContains(substr, cmd string, args ...string) bool { function confirmParse (line 294) | func confirmParse(in, cmd string, wantErr bool) func(*testing.T) { function singleParse (line 364) | func singleParse(p *Parser, in string, want *File) func(t *testing.T) { type errorCase (line 377) | type errorCase struct function errCase (line 386) | func errCase(in string, opts ...func(*errorCase)) errorCase { function langErr (line 394) | func langErr(want string, langSets ...LangVariant) func(*errorCase) { function flipConfirm (line 414) | func flipConfirm(langSet LangVariant) func(*errorCase) { function init (line 424) | func init() { function TestInputName (line 2075) | func TestInputName(t *testing.T) { type badReader (line 2093) | type badReader struct method Read (line 2095) | func (b badReader) Read(p []byte) (int, error) { return 0, errBadReader } function TestReadErr (line 2097) | func TestReadErr(t *testing.T) { type strictStringReader (line 2110) | type strictStringReader struct method Read (line 2119) | func (r *strictStringReader) Read(p []byte) (int, error) { function newStrictReader (line 2115) | func newStrictReader(s string) *strictStringReader { function TestParseStmtsSeq (line 2130) | func TestParseStmtsSeq(t *testing.T) { function TestParseStmtsSeqStopEarly (line 2157) | func TestParseStmtsSeqStopEarly(t *testing.T) { function TestParseStmtsSeqError (line 2186) | func TestParseStmtsSeqError(t *testing.T) { function TestParseWords (line 2214) | func TestParseWords(t *testing.T) { function TestParseWordsStopEarly (line 2242) | func TestParseWordsStopEarly(t *testing.T) { function TestParseWordsError (line 2259) | func TestParseWordsError(t *testing.T) { function TestParseDocument (line 2303) | func TestParseDocument(t *testing.T) { function TestParseDocumentError (line 2320) | func TestParseDocumentError(t *testing.T) { function TestParseArithmetic (line 2397) | func TestParseArithmetic(t *testing.T) { function TestParseArithmeticError (line 2413) | func TestParseArithmeticError(t *testing.T) { function TestParseStopAt (line 2468) | func TestParseStopAt(t *testing.T) { function TestValidName (line 2477) | func TestValidName(t *testing.T) { function TestIsIncomplete (line 2502) | func TestIsIncomplete(t *testing.T) { function TestPosEdgeCases (line 2560) | func TestPosEdgeCases(t *testing.T) { function TestParseRecoverErrors (line 2582) | func TestParseRecoverErrors(t *testing.T) { function countRecoveredPositions (line 2724) | func countRecoveredPositions(x reflect.Value) int { FILE: syntax/printer.go type PrinterOption (line 21) | type PrinterOption function Indent (line 25) | func Indent(spaces uint) PrinterOption { function BinaryNextLine (line 32) | func BinaryNextLine(enabled bool) PrinterOption { function SwitchCaseIndent (line 38) | func SwitchCaseIndent(enabled bool) PrinterOption { function SpaceRedirects (line 47) | func SpaceRedirects(enabled bool) PrinterOption { function KeepPadding (line 63) | func KeepPadding(enabled bool) PrinterOption { function Minify (line 83) | func Minify(enabled bool) PrinterOption { function SingleLine (line 93) | func SingleLine(enabled bool) PrinterOption { function FunctionNextLine (line 98) | func FunctionNextLine(enabled bool) PrinterOption { function NewPrinter (line 103) | func NewPrinter(opts ...PrinterOption) *Printer { type bufWriter (line 177) | type bufWriter interface type colCounter (line 185) | type colCounter struct method addByte (line 191) | func (c *colCounter) addByte(b byte) { method WriteByte (line 203) | func (c *colCounter) WriteByte(b byte) error { method WriteString (line 208) | func (c *colCounter) WriteString(s string) (int, error) { method Reset (line 215) | func (c *colCounter) Reset(w io.Writer) { type Printer (line 223) | type Printer struct method Print (line 120) | func (p *Printer) Print(w io.Writer, node Node) error { method reset (line 272) | func (p *Printer) reset() { method spaces (line 287) | func (p *Printer) spaces(n uint) { method space (line 293) | func (p *Printer) space() { method spacePad (line 298) | func (p *Printer) spacePad(pos Pos) { method wantsNewline (line 316) | func (p *Printer) wantsNewline(pos Pos, escapingNewline bool) bool { method bslashNewl (line 335) | func (p *Printer) bslashNewl() { method spacedString (line 344) | func (p *Printer) spacedString(s string, pos Pos) { method spacedToken (line 350) | func (p *Printer) spacedToken(s string, pos Pos) { method semiOrNewl (line 361) | func (p *Printer) semiOrNewl(s string, pos Pos) { method writeLit (line 378) | func (p *Printer) writeLit(s string) { method incLevel (line 389) | func (p *Printer) incLevel() { method decLevel (line 401) | func (p *Printer) decLevel() { method indent (line 408) | func (p *Printer) indent() { method newline (line 429) | func (p *Printer) newline(pos Pos) { method advanceLine (line 438) | func (p *Printer) advanceLine(line uint) { method flushHeredocs (line 444) | func (p *Printer) flushHeredocs() { method newlines (line 515) | func (p *Printer) newlines(pos Pos) { method rightParen (line 537) | func (p *Printer) rightParen(pos Pos) { method semiRsrv (line 545) | func (p *Printer) semiRsrv(s string, pos Pos) { method flushComments (line 560) | func (p *Printer) flushComments() { method comments (line 599) | func (p *Printer) comments(comments ...Comment) { method wordParts (line 613) | func (p *Printer) wordParts(wps []WordPart, quoted bool) { method wordPart (line 642) | func (p *Printer) wordPart(wp, next WordPart) { method dblQuoted (line 699) | func (p *Printer) dblQuoted(dq *DblQuoted) { method wroteIndex (line 715) | func (p *Printer) wroteIndex(index ArithmExpr) bool { method paramExp (line 727) | func (p *Printer) paramExp(pe *ParamExp) { method cmdSubst (line 801) | func (p *Printer) cmdSubst(cs *CmdSubst) { method loop (line 832) | func (p *Printer) loop(loop Loop) { method arithmExpr (line 854) | func (p *Printer) arithmExpr(expr ArithmExpr, compact, spacePlusMinus ... method arithmExprRecurse (line 861) | func (p *Printer) arithmExprRecurse(expr ArithmExpr, compact, spacePlu... method testExpr (line 907) | func (p *Printer) testExpr(expr TestExpr) { method testExprSameLine (line 918) | func (p *Printer) testExprSameLine(expr TestExpr) { method word (line 951) | func (p *Printer) word(w *Word) { method unquotedWord (line 956) | func (p *Printer) unquotedWord(w *Word) { method wordJoin (line 977) | func (p *Printer) wordJoin(ws []*Word) { method casePatternJoin (line 995) | func (p *Printer) casePatternJoin(pats []*Word) { method elemJoin (line 1021) | func (p *Printer) elemJoin(elems []*ArrayElem, last []Comment) { method stmt (line 1054) | func (p *Printer) stmt(s *Stmt) { method printRedirsUntil (line 1107) | func (p *Printer) printRedirsUntil(redirs []*Redirect, startRedirs int... method command (line 1130) | func (p *Printer) command(cmd Command, redirs []*Redirect) (startRedir... method ifClause (line 1372) | func (p *Printer) ifClause(ic *IfClause, elif bool) { method stmtList (line 1410) | func (p *Printer) stmtList(stmts []*Stmt, last []Comment) { method nestedStmts (line 1453) | func (p *Printer) nestedStmts(stmts []*Stmt, last []Comment, closing P... method assigns (line 1479) | func (p *Printer) assigns(assigns []*Assign) { type wantSpaceState (line 1514) | type wantSpaceState constant spaceNotRequired (line 1517) | spaceNotRequired wantSpaceState = iota constant spaceRequired (line 1518) | spaceRequired constant spaceWritten (line 1519) | spaceWritten type extraIndenter (line 1525) | type extraIndenter struct method WriteByte (line 1534) | func (e *extraIndenter) WriteByte(b byte) error { method WriteString (line 1574) | func (e *extraIndenter) WriteString(s string) (int, error) { function startsWithLparen (line 1581) | func startsWithLparen(node Node) bool { FILE: syntax/printer_test.go function TestPrintFiles (line 15) | func TestPrintFiles(t *testing.T) { function strPrint (line 41) | func strPrint(p *Printer, node Node) (string, error) { type printCase (line 47) | type printCase struct function samePrint (line 51) | func samePrint(s string) printCase { return printCase{in: s, want: s} } function TestPrintTable (line 666) | func TestPrintTable(t *testing.T) { function parsePath (line 683) | func parsePath(tb testing.TB, path string) *File { constant canonicalPath (line 696) | canonicalPath = "canonical.sh" function TestPrintMultiline (line 698) | func TestPrintMultiline(t *testing.T) { function TestPrintSpaces (line 720) | func TestPrintSpaces(t *testing.T) { type badWriter (line 764) | type badWriter struct method Write (line 766) | func (b badWriter) Write(p []byte) (int, error) { return 0, errBadWrit... function TestWriteErr (line 768) | func TestWriteErr(t *testing.T) { function TestPrintBinaryNextLine (line 789) | func TestPrintBinaryNextLine(t *testing.T) { function TestPrintSwitchCaseIndent (line 859) | func TestPrintSwitchCaseIndent(t *testing.T) { function TestPrintFunctionNextLine (line 881) | func TestPrintFunctionNextLine(t *testing.T) { function TestPrintSpaceRedirects (line 918) | func TestPrintSpaceRedirects(t *testing.T) { function TestPrintKeepPadding (line 940) | func TestPrintKeepPadding(t *testing.T) { function TestPrintKeepPaddingSpaces (line 983) | func TestPrintKeepPaddingSpaces(t *testing.T) { function TestPrintMinify (line 1001) | func TestPrintMinify(t *testing.T) { function TestPrintSingleLine (line 1104) | func TestPrintSingleLine(t *testing.T) { function TestPrintOptionsNotBroken (line 1160) | func TestPrintOptionsNotBroken(t *testing.T) { function printTest (line 1232) | func printTest(t *testing.T, parser *Parser, printer *Printer, in, want ... function TestPrintNodeTypes (line 1266) | func TestPrintNodeTypes(t *testing.T) { function TestPrintManyStmts (line 1347) | func TestPrintManyStmts(t *testing.T) { function TestKeepPaddingRepeated (line 1381) | func TestKeepPaddingRepeated(t *testing.T) { FILE: syntax/quote.go type QuoteError (line 13) | type QuoteError struct method Error (line 18) | func (e QuoteError) Error() string { constant quoteErrNull (line 23) | quoteErrNull = "shell strings cannot contain null bytes" constant quoteErrPOSIX (line 24) | quoteErrPOSIX = "POSIX shell lacks escape sequences" constant quoteErrRange (line 25) | quoteErrRange = "rune out of range" constant quoteErrMksh (line 26) | quoteErrMksh = "mksh cannot escape codepoints above 16 bits" function Quote (line 48) | func Quote(s string, lang LangVariant) (string, error) { function isHex (line 181) | func isHex(r rune) bool { FILE: syntax/quote_test.go function TestQuote (line 12) | func TestQuote(t *testing.T) { FILE: syntax/simplify.go function Simplify (line 19) | func Simplify(n Node) bool { type simplifier (line 25) | type simplifier struct method visit (line 29) | func (s *simplifier) visit(node Node) bool { method simplifyWord (line 91) | func (s *simplifier) simplifyWord(wps []WordPart) []WordPart { method removeParensArithm (line 138) | func (s *simplifier) removeParensArithm(x ArithmExpr) ArithmExpr { method inlineSimpleParams (line 149) | func (s *simplifier) inlineSimpleParams(x ArithmExpr) ArithmExpr { method inlineSubshell (line 171) | func (s *simplifier) inlineSubshell(stmts []*Stmt) []*Stmt { method unquoteParams (line 188) | func (s *simplifier) unquoteParams(x TestExpr) TestExpr { method removeParensTest (line 205) | func (s *simplifier) removeParensTest(x TestExpr) TestExpr { method removeNegateTest (line 216) | func (s *simplifier) removeNegateTest(x TestExpr) TestExpr { FILE: syntax/simplify_test.go type simplifyTest (line 12) | type simplifyTest struct function noSimple (line 16) | func noSimple(in string) simplifyTest { function TestSimplify (line 72) | func TestSimplify(t *testing.T) { FILE: syntax/token_string.go function _ (line 7) | func _() { constant _token_name (line 157) | _token_name = "illegalTokEOFNewlLitLitWordLitRedirrealTokenBoundary'\"`&... method String (line 161) | func (i token) String() string { FILE: syntax/tokens.go type token (line 8) | type token method isLit (line 174) | func (t token) isLit() bool { constant illegalTok (line 12) | illegalTok token = iota constant _EOF (line 14) | _EOF constant _Newl (line 15) | _Newl constant _Lit (line 16) | _Lit constant _LitWord (line 17) | _LitWord constant _LitRedir (line 18) | _LitRedir constant _realTokenBoundary (line 21) | _realTokenBoundary constant sglQuote (line 23) | sglQuote constant dblQuote (line 24) | dblQuote constant bckQuote (line 25) | bckQuote constant and (line 27) | and constant andAnd (line 28) | andAnd constant orOr (line 29) | orOr constant or (line 30) | or constant orAnd (line 31) | orAnd constant andPipe (line 32) | andPipe constant andBang (line 33) | andBang constant dollar (line 35) | dollar constant dollSglQuote (line 36) | dollSglQuote constant dollDblQuote (line 37) | dollDblQuote constant dollBrace (line 38) | dollBrace constant dollBrack (line 39) | dollBrack constant dollParen (line 40) | dollParen constant dollDblParen (line 41) | dollDblParen constant leftBrace (line 42) | leftBrace constant leftBrack (line 43) | leftBrack constant dblLeftBrack (line 44) | dblLeftBrack constant leftParen (line 45) | leftParen constant dblLeftParen (line 46) | dblLeftParen constant rightBrace (line 48) | rightBrace constant rightBrack (line 49) | rightBrack constant dblRightBrack (line 50) | dblRightBrack constant rightParen (line 51) | rightParen constant dblRightParen (line 52) | dblRightParen constant semicolon (line 53) | semicolon constant dblSemicolon (line 55) | dblSemicolon constant semiAnd (line 56) | semiAnd constant dblSemiAnd (line 57) | dblSemiAnd constant semiOr (line 58) | semiOr constant exclMark (line 60) | exclMark constant tilde (line 61) | tilde constant addAdd (line 62) | addAdd constant subSub (line 63) | subSub constant star (line 64) | star constant power (line 65) | power constant equal (line 66) | equal constant nequal (line 67) | nequal constant lequal (line 68) | lequal constant gequal (line 69) | gequal constant addAssgn (line 71) | addAssgn constant subAssgn (line 72) | subAssgn constant mulAssgn (line 73) | mulAssgn constant quoAssgn (line 74) | quoAssgn constant remAssgn (line 75) | remAssgn constant andAssgn (line 76) | andAssgn constant orAssgn (line 77) | orAssgn constant xorAssgn (line 78) | xorAssgn constant shlAssgn (line 79) | shlAssgn constant shrAssgn (line 80) | shrAssgn constant andBoolAssgn (line 81) | andBoolAssgn constant orBoolAssgn (line 82) | orBoolAssgn constant xorBoolAssgn (line 83) | xorBoolAssgn constant powAssgn (line 84) | powAssgn constant rdrOut (line 86) | rdrOut constant appOut (line 87) | appOut constant rdrIn (line 88) | rdrIn constant rdrInOut (line 89) | rdrInOut constant dplIn (line 90) | dplIn constant dplOut (line 91) | dplOut constant rdrClob (line 92) | rdrClob constant appClob (line 93) | appClob constant hdoc (line 94) | hdoc constant dashHdoc (line 95) | dashHdoc constant wordHdoc (line 96) | wordHdoc constant rdrAll (line 97) | rdrAll constant rdrAllClob (line 98) | rdrAllClob constant appAll (line 99) | appAll constant appAllClob (line 100) | appAllClob constant cmdIn (line 102) | cmdIn constant assgnParen (line 103) | assgnParen constant cmdOut (line 104) | cmdOut constant plus (line 106) | plus constant colPlus (line 107) | colPlus constant minus (line 108) | minus constant colMinus (line 109) | colMinus constant quest (line 110) | quest constant colQuest (line 111) | colQuest constant assgn (line 112) | assgn constant colAssgn (line 113) | colAssgn constant perc (line 114) | perc constant dblPerc (line 115) | dblPerc constant hash (line 116) | hash constant dblHash (line 117) | dblHash constant colHash (line 118) | colHash constant colPipe (line 119) | colPipe constant colStar (line 120) | colStar constant caret (line 121) | caret constant dblCaret (line 122) | dblCaret constant comma (line 123) | comma constant dblComma (line 124) | dblComma constant at (line 125) | at constant slash (line 126) | slash constant dblSlash (line 127) | dblSlash constant period (line 128) | period constant colon (line 129) | colon constant tsExists (line 131) | tsExists constant tsRegFile (line 132) | tsRegFile constant tsDirect (line 133) | tsDirect constant tsCharSp (line 134) | tsCharSp constant tsBlckSp (line 135) | tsBlckSp constant tsNmPipe (line 136) | tsNmPipe constant tsSocket (line 137) | tsSocket constant tsSmbLink (line 138) | tsSmbLink constant tsSticky (line 139) | tsSticky constant tsGIDSet (line 140) | tsGIDSet constant tsUIDSet (line 141) | tsUIDSet constant tsGrpOwn (line 142) | tsGrpOwn constant tsUsrOwn (line 143) | tsUsrOwn constant tsModif (line 144) | tsModif constant tsRead (line 145) | tsRead constant tsWrite (line 146) | tsWrite constant tsExec (line 147) | tsExec constant tsNoEmpty (line 148) | tsNoEmpty constant tsFdTerm (line 149) | tsFdTerm constant tsEmpStr (line 150) | tsEmpStr constant tsNempStr (line 151) | tsNempStr constant tsOptSet (line 152) | tsOptSet constant tsVarSet (line 153) | tsVarSet constant tsRefVar (line 154) | tsRefVar constant tsReMatch (line 156) | tsReMatch constant tsNewer (line 157) | tsNewer constant tsOlder (line 158) | tsOlder constant tsDevIno (line 159) | tsDevIno constant tsEql (line 160) | tsEql constant tsNeq (line 161) | tsNeq constant tsLeq (line 162) | tsLeq constant tsGeq (line 163) | tsGeq constant tsLss (line 164) | tsLss constant tsGtr (line 165) | tsGtr constant globQuest (line 167) | globQuest constant globStar (line 168) | globStar constant globPlus (line 169) | globPlus constant globAt (line 170) | globAt constant globExcl (line 171) | globExcl type RedirOperator (line 178) | type RedirOperator method String (line 382) | func (o RedirOperator) String() string { return token(o).String() } constant RdrOut (line 181) | RdrOut = RedirOperator(rdrOut) + iota constant AppOut (line 182) | AppOut constant RdrIn (line 183) | RdrIn constant RdrInOut (line 184) | RdrInOut constant DplIn (line 185) | DplIn constant DplOut (line 186) | DplOut constant RdrClob (line 187) | RdrClob constant AppClob (line 188) | AppClob constant Hdoc (line 189) | Hdoc constant DashHdoc (line 190) | DashHdoc constant WordHdoc (line 191) | WordHdoc constant RdrAll (line 192) | RdrAll constant RdrAllClob (line 193) | RdrAllClob constant AppAll (line 194) | AppAll constant AppAllClob (line 195) | AppAllClob constant ClbOut (line 200) | ClbOut = RdrClob type ProcOperator (line 203) | type ProcOperator method String (line 383) | func (o ProcOperator) String() string { return token(o).String() } constant CmdIn (line 206) | CmdIn = ProcOperator(cmdIn) + iota constant CmdInTemp (line 207) | CmdInTemp constant CmdOut (line 208) | CmdOut type GlobOperator (line 211) | type GlobOperator method String (line 384) | func (o GlobOperator) String() string { return token(o).String() } constant GlobZeroOrOne (line 214) | GlobZeroOrOne = GlobOperator(globQuest) + iota constant GlobZeroOrMore (line 215) | GlobZeroOrMore constant GlobOneOrMore (line 216) | GlobOneOrMore constant GlobOne (line 217) | GlobOne constant GlobExcept (line 218) | GlobExcept type BinCmdOperator (line 221) | type BinCmdOperator method String (line 385) | func (o BinCmdOperator) String() string { return token(o).String() } constant AndStmt (line 224) | AndStmt = BinCmdOperator(andAnd) + iota constant OrStmt (line 225) | OrStmt constant Pipe (line 226) | Pipe constant PipeAll (line 227) | PipeAll type CaseOperator (line 230) | type CaseOperator method String (line 386) | func (o CaseOperator) String() string { return token(o).String() } constant Break (line 233) | Break = CaseOperator(dblSemicolon) + iota constant Fallthrough (line 234) | Fallthrough constant Resume (line 235) | Resume constant ResumeKorn (line 236) | ResumeKorn type ParNamesOperator (line 239) | type ParNamesOperator method String (line 387) | func (o ParNamesOperator) String() string { return token(o).String() } constant NamesPrefix (line 242) | NamesPrefix = ParNamesOperator(star) constant NamesPrefixWords (line 243) | NamesPrefixWords = ParNamesOperator(at) type ParExpOperator (line 246) | type ParExpOperator method String (line 388) | func (o ParExpOperator) String() string { return token(o).String() } constant AlternateUnset (line 249) | AlternateUnset = ParExpOperator(plus) + iota constant AlternateUnsetOrNull (line 250) | AlternateUnsetOrNull constant DefaultUnset (line 251) | DefaultUnset constant DefaultUnsetOrNull (line 252) | DefaultUnsetOrNull constant ErrorUnset (line 253) | ErrorUnset constant ErrorUnsetOrNull (line 254) | ErrorUnsetOrNull constant AssignUnset (line 255) | AssignUnset constant AssignUnsetOrNull (line 256) | AssignUnsetOrNull constant RemSmallSuffix (line 257) | RemSmallSuffix constant RemLargeSuffix (line 258) | RemLargeSuffix constant RemSmallPrefix (line 259) | RemSmallPrefix constant RemLargePrefix (line 260) | RemLargePrefix constant MatchEmpty (line 261) | MatchEmpty constant ArrayExclude (line 262) | ArrayExclude constant ArrayIntersect (line 263) | ArrayIntersect constant UpperFirst (line 264) | UpperFirst constant UpperAll (line 265) | UpperAll constant LowerFirst (line 266) | LowerFirst constant LowerAll (line 267) | LowerAll constant OtherParamOps (line 268) | OtherParamOps type UnAritOperator (line 271) | type UnAritOperator method String (line 389) | func (o UnAritOperator) String() string { return token(o).String() } constant Not (line 274) | Not = UnAritOperator(exclMark) + iota constant BitNegation (line 275) | BitNegation constant Inc (line 276) | Inc constant Dec (line 277) | Dec constant Plus (line 278) | Plus = UnAritOperator(plus) constant Minus (line 279) | Minus = UnAritOperator(minus) type BinAritOperator (line 282) | type BinAritOperator method String (line 390) | func (o BinAritOperator) String() string { return token(o).String() } constant Add (line 285) | Add = BinAritOperator(plus) constant Sub (line 286) | Sub = BinAritOperator(minus) constant Mul (line 287) | Mul = BinAritOperator(star) constant Quo (line 288) | Quo = BinAritOperator(slash) constant Rem (line 289) | Rem = BinAritOperator(perc) constant Pow (line 290) | Pow = BinAritOperator(power) constant Eql (line 291) | Eql = BinAritOperator(equal) constant Gtr (line 292) | Gtr = BinAritOperator(rdrOut) constant Lss (line 293) | Lss = BinAritOperator(rdrIn) constant Neq (line 294) | Neq = BinAritOperator(nequal) constant Leq (line 295) | Leq = BinAritOperator(lequal) constant Geq (line 296) | Geq = BinAritOperator(gequal) constant And (line 297) | And = BinAritOperator(and) constant Or (line 298) | Or = BinAritOperator(or) constant Xor (line 299) | Xor = BinAritOperator(caret) constant Shr (line 300) | Shr = BinAritOperator(appOut) constant Shl (line 301) | Shl = BinAritOperator(hdoc) constant AndArit (line 305) | AndArit = BinAritOperator(andAnd) constant OrArit (line 306) | OrArit = BinAritOperator(orOr) constant XorBool (line 307) | XorBool = BinAritOperator(dblCaret) constant Comma (line 308) | Comma = BinAritOperator(comma) constant TernQuest (line 309) | TernQuest = BinAritOperator(quest) constant TernColon (line 310) | TernColon = BinAritOperator(colon) constant Assgn (line 312) | Assgn = BinAritOperator(assgn) constant AddAssgn (line 313) | AddAssgn = BinAritOperator(addAssgn) constant SubAssgn (line 314) | SubAssgn = BinAritOperator(subAssgn) constant MulAssgn (line 315) | MulAssgn = BinAritOperator(mulAssgn) constant QuoAssgn (line 316) | QuoAssgn = BinAritOperator(quoAssgn) constant RemAssgn (line 317) | RemAssgn = BinAritOperator(remAssgn) constant AndAssgn (line 318) | AndAssgn = BinAritOperator(andAssgn) constant OrAssgn (line 319) | OrAssgn = BinAritOperator(orAssgn) constant XorAssgn (line 320) | XorAssgn = BinAritOperator(xorAssgn) constant ShlAssgn (line 321) | ShlAssgn = BinAritOperator(shlAssgn) constant ShrAssgn (line 322) | ShrAssgn = BinAritOperator(shrAssgn) constant AndBoolAssgn (line 323) | AndBoolAssgn = BinAritOperator(andBoolAssgn) constant OrBoolAssgn (line 324) | OrBoolAssgn = BinAritOperator(orBoolAssgn) constant XorBoolAssgn (line 325) | XorBoolAssgn = BinAritOperator(xorBoolAssgn) constant PowAssgn (line 326) | PowAssgn = BinAritOperator(powAssgn) type UnTestOperator (line 329) | type UnTestOperator method String (line 391) | func (o UnTestOperator) String() string { return token(o).String() } constant TsExists (line 332) | TsExists = UnTestOperator(tsExists) + iota constant TsRegFile (line 333) | TsRegFile constant TsDirect (line 334) | TsDirect constant TsCharSp (line 335) | TsCharSp constant TsBlckSp (line 336) | TsBlckSp constant TsNmPipe (line 337) | TsNmPipe constant TsSocket (line 338) | TsSocket constant TsSmbLink (line 339) | TsSmbLink constant TsSticky (line 340) | TsSticky constant TsGIDSet (line 341) | TsGIDSet constant TsUIDSet (line 342) | TsUIDSet constant TsGrpOwn (line 343) | TsGrpOwn constant TsUsrOwn (line 344) | TsUsrOwn constant TsModif (line 345) | TsModif constant TsRead (line 346) | TsRead constant TsWrite (line 347) | TsWrite constant TsExec (line 348) | TsExec constant TsNoEmpty (line 349) | TsNoEmpty constant TsFdTerm (line 350) | TsFdTerm constant TsEmpStr (line 351) | TsEmpStr constant TsNempStr (line 352) | TsNempStr constant TsOptSet (line 353) | TsOptSet constant TsVarSet (line 354) | TsVarSet constant TsRefVar (line 355) | TsRefVar constant TsNot (line 356) | TsNot = UnTestOperator(exclMark) constant TsParen (line 357) | TsParen = UnTestOperator(leftParen) type BinTestOperator (line 360) | type BinTestOperator method String (line 392) | func (o BinTestOperator) String() string { return token(o).String() } constant TsReMatch (line 363) | TsReMatch = BinTestOperator(tsReMatch) + iota constant TsNewer (line 364) | TsNewer constant TsOlder (line 365) | TsOlder constant TsDevIno (line 366) | TsDevIno constant TsEql (line 367) | TsEql constant TsNeq (line 368) | TsNeq constant TsLeq (line 369) | TsLeq constant TsGeq (line 370) | TsGeq constant TsLss (line 371) | TsLss constant TsGtr (line 372) | TsGtr constant AndTest (line 373) | AndTest = BinTestOperator(andAnd) constant OrTest (line 374) | OrTest = BinTestOperator(orOr) constant TsMatchShort (line 375) | TsMatchShort = BinTestOperator(assgn) constant TsMatch (line 376) | TsMatch = BinTestOperator(equal) constant TsNoMatch (line 377) | TsNoMatch = BinTestOperator(nequal) constant TsBefore (line 378) | TsBefore = BinTestOperator(rdrIn) constant TsAfter (line 379) | TsAfter = BinTestOperator(rdrOut) FILE: syntax/typedjson/json.go function Encode (line 29) | func Encode(w io.Writer, node syntax.Node) error { type EncodeOptions (line 34) | type EncodeOptions struct method Encode (line 42) | func (opts EncodeOptions) Encode(w io.Writer, node syntax.Node) error { function encodeValue (line 56) | func encodeValue(val reflect.Value) (reflect.Value, string) { type exportedPos (line 171) | type exportedPos struct function encodePos (line 175) | func encodePos(encPtr reflect.Value, val syntax.Pos) { function decodePos (line 189) | func decodePos(val reflect.Value, enc map[string]any) { function Decode (line 197) | func Decode(r io.Reader) (syntax.Node, error) { type DecodeOptions (line 202) | type DecodeOptions struct method Decode (line 208) | func (opts DecodeOptions) Decode(r io.Reader) (syntax.Node, error) { function decodeValue (line 263) | func decodeValue(val reflect.Value, enc any) error { FILE: syntax/typedjson/json_test.go function TestRoundtrip (line 22) | func TestRoundtrip(t *testing.T) { FILE: syntax/walk.go function Walk (line 16) | func Walk(node Node, f func(Node) bool) { type nilableNode (line 187) | type nilableNode interface function walkNilable (line 192) | func walkNilable[N nilableNode](node N, f func(Node) bool) { function walkList (line 199) | func walkList[N Node](list []N, f func(Node) bool) { function walkComments (line 205) | func walkComments(list []Comment, f func(Node) bool) { function DebugPrint (line 214) | func DebugPrint(w io.Writer, node Node) error { type debugPrinter (line 221) | type debugPrinter struct method printf (line 227) | func (p *debugPrinter) printf(format string, args ...any) { method newline (line 234) | func (p *debugPrinter) newline() { method print (line 241) | func (p *debugPrinter) print(x reflect.Value) { FILE: syntax/walk_test.go function TestWalk (line 12) | func TestWalk(t *testing.T) { type newNode (line 114) | type newNode struct method Pos (line 116) | func (newNode) Pos() Pos { return Pos{} } method End (line 117) | func (newNode) End() Pos { return Pos{} } function TestWalkUnexpectedType (line 119) | func TestWalkUnexpectedType(t *testing.T) {