code: func (r *Runner) Run(ctx context.Context, node syntax.Node) error {
  	if !r.didReset {
  		r.Reset()
  	}
  	r.fillExpandConfig(ctx)
  	r.err = nil
  	r.filename = ""
  	switch x := node.(type) {
  	case *syntax.File:
  		r.filename = x.Name
  		r.stmts(ctx, x.Stmts)
  	case *syntax.Stmt:
  		r.stmt(ctx, x)
  	case syntax.Command:
  		r.cmd(ctx, x)
  	default:
  		return fmt.Errorf("node can only be File, Stmt, or Command: %T", x)
  	}
  	if r.exit > 0 {
  		r.setErr(ExitStatus(r.exit))
  	}
  	return r.err
  }
docs: // Run interprets a node, which can be a *File, *Stmt, or Command. If a non-nil
  // error is returned, it will typically be of type ExitStatus or
  // ShellExitStatus.
  //
  // Run can be called multiple times synchronously to interpret programs
  // incrementally. To reuse a Runner without keeping the internal shell state,
  // call Reset.