Class ShellAbstractValueNodeAbstract

Hierarchy (view full)

Constructors

Properties

annotations: string[] = []
children: ShellNodeTypes[] = []

The children nodes

isChanged: boolean = false
parent: ShellNodeTypes = null

The parent node

type: "BASH-AND-IF" | "BASH-AND-MEM" | "BASH-ARRAY" | "BASH-ASSIGN" | "BASH-ASSIGN-LHS" | "BASH-ASSIGN-RHS" | "BASH-BACKGROUNDED" | "BASH-BACKTICKED" | "BASH-BANGED" | "BASH-BRACE-EXPANSION" | "BASH-BRACE-GROUP" | "BASH-CASE-EXP-CASE" | "BASH-CASE-EXP-CASES" | "BASH-CASE-EXPRESSION" | "BASH-CASE-EXPRESSIONS" | "BASH-CASE-EXP-TARGET" | "BASH-CASE-KIND" | "BASH-CASE-LABELS" | "BASH-COMMAND-ARGS" | "BASH-COMMAND-COMMAND" | "BASH-COMMAND-PREFIX" | "BASH-CONCAT" | "BASH-CONDITION" | "BASH-CONDITION-AND" | "BASH-CONDITION-AND-LHS" | "BASH-CONDITION-AND-RHS" | "BASH-CONDITION-BINARY" | "BASH-CONDITION-BINARY-LHS" | "BASH-CONDITION-BINARY-OP" | "BASH-CONDITION-BINARY-RHS" | "BASH-CONDITION-EMPTY" | "BASH-CONDITION-EXP" | "BASH-CONDITION-NULLARY" | "BASH-CONDITION-OP" | "BASH-CONDITION-OR" | "BASH-CONDITION-OR-LHS" | "BASH-CONDITION-OR-RHS" | "BASH-CONDITION-UNARY" | "BASH-CONDITION-UNARY-EXP" | "BASH-CONDITION-UNARY-OP" | "BASH-DECL-CLAUSE" | "BASH-DOLLAR-BRACE" | "BASH-DOLLAR-ARITHMETIC" | "BASH-DOLLAR-PARENS" | "BASH-DOLLAR-SINGLE-QUOTED" | "BASH-DOUBLE-QUOTED" | "BASH-EXT-GLOB" | "BASH-FOR-IN" | "BASH-FOR-IN-BODY" | "BASH-FUNCTION" | "BASH-GLOB" | "BASH-IF-CONDITION" | "BASH-IF-ELSE" | "BASH-IF-ELSE-IF-EXP-CHECK" | "BASH-IF-ELSE-IF-EXPRESSION" | "BASH-IF-EXPRESSION" | "BASH-IF-THEN" | "BASH-IO-DUPE-STDERR" | "BASH-IO-DUPE-STDOUT" | "BASH-LITERAL" | "BASH-WORD" | "BASH-WORD-ITERATION" | "BASH-OP" | "BASH-OR-IF" | "BASH-OR-MEM" | "BASH-PATH" | "BASH-PIPELINE" | "BASH-PROC-SUB" | "BASH-PROC-SUB-BODY" | "BASH-REDIRECT" | "BASH-SCRIPT" | "BASH-SINGLE-QUOTED" | "BASH-SUBSHELL" | "BASH-UNTIL-BODY" | "BASH-UNTIL-CONDITION" | "BASH-UNTIL-EXPRESSION" | "BASH-VARIABLE" | "BASH-WHILE-EXPRESSION" | "BASH-COMMAND" | "BASH-ARITHMETIC-EXPRESSION" | "BASH-ARITHMETIC-SEQUENCE" | "BASH-ARITHMETIC-EXPANSION" | "BASH-ARITHMETIC-VARIABLE" | "BASH-ARITHMETIC-BINARY" | "BASH-ARITHMETIC-BINARY-OP" | "BASH-ARITHMETIC-BINARY-LHS" | "BASH-ARITHMETIC-BINARY-RHS" | "MAYBE-BASH" | "BASH-FUNCTION-BODY" | "BASH-FUNCTION-NAME" | "BASH-COMMENT" | "BASH-REPLACE"

Accessors

Methods

  • Iterate over the children nodes (non recursive)

    Parameters

    • callback: ((node, index) => void)

      callback function to call for each node

        • (node, index): void
        • Parameters

          Returns void

    • Optional filter: ((node) => boolean)

    Returns void

  • Returns {
        children?: {
            children?: { type: string; position: { lineStart: number; columnStart: number; lineEnd: number; columnEnd: number; }; children?: ...[]; value?: string; }[];
            position: {
                columnEnd: number;
                columnStart: number;
                lineEnd: number;
                lineStart: number;
            };
            type: string;
            value?: string;
        }[];
        position: {
            columnEnd: number;
            columnStart: number;
            lineEnd: number;
            lineStart: number;
        };
        type: string;
        value?: string;
    }

    • Optional children?: {
          children?: { type: string; position: { lineStart: number; columnStart: number; lineEnd: number; columnEnd: number; }; children?: ...[]; value?: string; }[];
          position: {
              columnEnd: number;
              columnStart: number;
              lineEnd: number;
              lineStart: number;
          };
          type: string;
          value?: string;
      }[]
    • position: {
          columnEnd: number;
          columnStart: number;
          lineEnd: number;
          lineStart: number;
      }
      • columnEnd: number
      • columnStart: number
      • lineEnd: number
      • lineStart: number
    • type: string
    • Optional value?: string
  • Return a string representation of this node

    Parameters

    • asPrettyPrint: boolean = true

      true if the output should be pretty printed

    Returns string

    a string representation of this node

  • traverse all children recursively

    Parameters

    • callback: ((node) => boolean | void)

      returns false to stop the traverse

        • (node): boolean | void
        • Parameters

          Returns boolean | void

    • __namedParameters: {
          includeSelf: boolean;
      } = ...
      • includeSelf: boolean

    Returns boolean

    false if not everything has been traversed

Generated using TypeDoc