diff --git a/docs/v2/annotated-source/nodes.html b/docs/v2/annotated-source/nodes.html index e7cdea3459..488b3c138d 100644 --- a/docs/v2/annotated-source/nodes.html +++ b/docs/v2/annotated-source/nodes.html @@ -4977,8 +4977,22 @@

Assign

obj.error message if message unless obj instanceof Elision assigns.push new Assign(obj, val, null, param: @param, subpattern: yes).compileToFragments o, LEVEL_LIST - else - assigns.push idx.compileToFragments o, LEVEL_LIST + else + + + + +
  • +
    + +
    + +
    +

    Output Elision only if idx is i++, e.g. expandedIdx.

    + +
    + +
            assigns.push idx.compileToFragments o, LEVEL_LIST if expandedIdx
     
         assigns.push vvar unless top or @subpattern
         fragments = @joinFragmentArrays assigns, ', '
    @@ -4987,11 +5001,11 @@ 

    Assign

  • -
  • +
  • - +

    When compiling a conditional assignment, take care to ensure that the operands are only evaluated once, even though we have to reference them @@ -5005,11 +5019,11 @@

    Assign

  • -
  • +
  • - +

    Disallow conditional assignment of undefined variables.

    @@ -5028,11 +5042,11 @@

    Assign

  • -
  • +
  • - +

    Convert special math assignment operators like a **= b to the equivalent extended form a = a ** b and then compiles that.

    @@ -5046,11 +5060,11 @@

    Assign

  • -
  • +
  • - +

    Compile the assignment from an array splice literal, using JavaScript’s Array#splice method.

    @@ -5087,11 +5101,11 @@

    Assign

  • -
  • +
  • - +

    FuncGlyph

    @@ -5105,11 +5119,11 @@

    FuncGlyph

  • -
  • +
  • - +

    Code

    @@ -5118,11 +5132,11 @@

    Code

  • -
  • +
  • - +

    A function definition. This is the only node that creates a new Scope. When for the purposes of walking the contents of a function body, the Code @@ -5160,11 +5174,11 @@

    Code

  • -
  • +
  • - +

    Compilation creates a new scope unless explicitly asked to share with the outer scope. Handles splat parameters in the parameter list by setting @@ -5199,11 +5213,11 @@

    Code

  • -
  • +
  • - +

    Check for duplicate parameters and separate this assignments.

    @@ -5223,11 +5237,11 @@

    Code

  • -
  • +
  • - +

    Parse the parameters, adding them to the list of parameters to put in the function definition; and dealing with splats or expansions, including @@ -5245,11 +5259,11 @@

    Code

  • -
  • +
  • - +

    Was ... used with this parameter? (Only one such parameter is allowed per function.) Splat/expansion parameters cannot have default values, @@ -5269,11 +5283,11 @@

    Code

  • -
  • +
  • - +

    Splat arrays are treated oddly by ES; deal with them the legacy way in the function body. TODO: Should this be handled in the @@ -5298,11 +5312,11 @@

    Code

  • -
  • +
  • - +

    Parse all other parameters; if a splat paramater has not yet been encountered, add these other parameters to the list to be output in @@ -5318,11 +5332,11 @@

    Code

  • -
  • +
  • - +

    This parameter cannot be declared or assigned in the parameter list. So put a reference in the parameter list and add a statement @@ -5341,11 +5355,11 @@

    Code

  • -
  • +
  • - +

    If this parameter comes before the splat or expansion, it will go in the function definition parameter list.

    @@ -5357,11 +5371,11 @@

    Code

  • -
  • +
  • - +

    If this parameter has a default value, and it hasn’t already been set by the shouldCache() block above, define it as a statement in @@ -5381,11 +5395,11 @@

    Code

  • -
  • +
  • - +

    Add this parameter’s reference(s) to the function scope.

    @@ -5396,11 +5410,11 @@

    Code

  • -
  • +
  • - +

    This parameter is destructured.

    @@ -5411,11 +5425,11 @@

    Code

  • -
  • +
  • - +

    Compile foo({a, b...}) -> to foo(arg) -> {a, b...} = arg. Can be removed once ES proposal hits Stage 4.

    @@ -5431,11 +5445,11 @@

    Code

  • -
  • +
  • - +

    Compile foo({a, b...} = {}) -> to foo(arg = {}) -> {a, b...} = arg.

    @@ -5451,11 +5465,11 @@

    Code

  • -
  • +
  • - +

    This compilation of the parameter is only to get its name to add to the scope name tracking; since the compilation output here @@ -5474,11 +5488,11 @@

    Code

  • -
  • +
  • - +

    If this parameter had a default value, since it’s no longer in the function parameter list we need to assign its default value @@ -5494,11 +5508,11 @@

    Code

  • -
  • +
  • - +

    Add this parameter to the scope, since it wouldn’t have been added yet since it was skipped earlier.

    @@ -5510,11 +5524,11 @@

    Code

  • -
  • +
  • - +

    If there were parameters after the splat or expansion parameter, those parameters need to be assigned in the body of the function.

    @@ -5526,11 +5540,11 @@

    Code

  • -
  • +
  • - +

    Create a destructured assignment, e.g. [a, b, c] = [args..., b, c]

    @@ -5543,11 +5557,11 @@

    Code

  • -
  • +
  • - +

    Add new expressions to the function body

    @@ -5564,11 +5578,11 @@

    Code

  • -
  • +
  • - +

    JavaScript doesn’t allow bound (=>) functions to also be generators. This is usually caught via Op::compileContinuation, but double-check:

    @@ -5582,11 +5596,11 @@

    Code

  • -
  • +
  • - +

    Assemble the output

    @@ -5605,11 +5619,11 @@

    Code

  • -
  • +
  • - +

    Block comments between a function name and ( get output between function and (.

    @@ -5625,11 +5639,11 @@

    Code

  • -
  • +
  • - +

    Compile this parameter, but if any generated variables get created (e.g. ref), shift those into the parent scope since we can’t put a @@ -5647,11 +5661,11 @@

    Code

  • -
  • +
  • - +

    Block comments between ) and ->/=> get output between ) and {.

    @@ -5666,11 +5680,11 @@

    Code

  • -
  • +
  • - +

    We need to compile the body before method names to ensure super references are handled.

    @@ -5701,11 +5715,11 @@

    Code

  • -
  • +
  • - +

    Short-circuit traverseChildren method to prevent it from crossing scope boundaries unless crossScope is true.

    @@ -5718,11 +5732,11 @@

    Code

  • -
  • +
  • - +

    Short-circuit replaceInContext method to prevent it from crossing context boundaries. Bound functions have the same context.

    @@ -5755,11 +5769,11 @@

    Code

  • -
  • +
  • - +

    Find all super calls in the given context node; returns true if iterator is called.

    @@ -5775,11 +5789,11 @@

    Code

  • -
  • +
  • - +

    super in a constructor (the only super without an accessor) cannot be given an argument with a reference to this, as that would @@ -5798,11 +5812,11 @@

    Code

  • -
  • +
  • - +

    super has the same target in bound (arrow) functions, so check them too

    @@ -5815,11 +5829,11 @@

    Code

  • -
  • +
  • - +

    Param

    @@ -5828,11 +5842,11 @@

    Param

  • -
  • +
  • - +

    A parameter in a function definition. Beyond a typical JavaScript parameter, these parameters can also attach themselves to the context of the function, @@ -5877,11 +5891,11 @@

    Param

  • -
  • +
  • - +

    Iterates the name or names of a Param. In a sense, a destructured parameter represents multiple JS parameters. This @@ -5898,11 +5912,11 @@

    Param

  • -
  • +
  • - +