Bug 924879 - Minor cleanups for Parser.jsm, r=past
authorVictor Porof <vporof@mozilla.com>
Tue, 15 Oct 2013 20:10:34 +0300
changeset 165655 a87b6c2d9151a6a92af6ae80427972e781749fe5
parent 165654 1dd4cd4890fc5c28f912dc53d1b2bf394fd129c2
child 165656 f615c239b9be769fed66eb24fdd323c341a266b9
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs924879
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 924879 - Minor cleanups for Parser.jsm, r=past
browser/devtools/shared/Parser.jsm
--- a/browser/devtools/shared/Parser.jsm
+++ b/browser/devtools/shared/Parser.jsm
@@ -27,17 +27,17 @@ Parser.prototype = {
    * Gets a collection of parser methods for a specified source.
    *
    * @param string aUrl [optional]
    *        The source url. The AST nodes will be cached, so you can use this
    *        identifier to avoid parsing the whole source again.
    * @param string aSource
    *        The source text content.
    */
-  get: function P_get(aUrl, aSource) {
+  get: function(aUrl, aSource) {
     // Try to use the cached AST nodes, to avoid useless parsing operations.
     if (this._cache.has(aUrl)) {
       return this._cache.get(aUrl);
     }
 
     // The source may not necessarily be JS, in which case we need to extract
     // all the scripts. Fastest/easiest way is with a regular expression.
     // Don't worry, the rules of using a <script> tag are really strict,
@@ -84,27 +84,27 @@ Parser.prototype = {
     let pool = new SyntaxTreesPool(syntaxTrees);
     this._cache.set(aUrl, pool);
     return pool;
   },
 
   /**
    * Clears all the parsed sources from cache.
    */
-  clearCache: function P_clearCache() {
+  clearCache: function() {
     this._cache.clear();
   },
 
   /**
    * Clears the AST for a particular source.
    *
    * @param String aUrl
    *        The URL of the source that is being cleared.
    */
-  clearSource: function P_clearSource(aUrl) {
+  clearSource: function(aUrl) {
     this._cache.delete(aUrl);
   },
 
   _cache: null
 };
 
 /**
  * A pool handling a collection of AST nodes generated by the reflection API.
@@ -116,37 +116,30 @@ function SyntaxTreesPool(aSyntaxTrees) {
   this._trees = aSyntaxTrees;
   this._cache = new Map();
 }
 
 SyntaxTreesPool.prototype = {
   /**
    * @see SyntaxTree.prototype.getNamedFunctionDefinitions
    */
-  getNamedFunctionDefinitions: function STP_getNamedFunctionDefinitions(aSubstring) {
+  getNamedFunctionDefinitions: function(aSubstring) {
     return this._call("getNamedFunctionDefinitions", aSubstring);
   },
 
   /**
-   * @see SyntaxTree.prototype.getFunctionAtLocation
-   */
-  getFunctionAtLocation: function STP_getFunctionAtLocation(aLine, aColumn) {
-    return this._call("getFunctionAtLocation", [aLine, aColumn]);
-  },
-
-  /**
    * Finds the offset and length of the script containing the specified offset
    * relative to its parent source.
    *
    * @param number aOffset
    *        The offset relative to the parent source.
    * @return array
    *         The offset and length relative to the enclosing script.
    */
-  getScriptInfo: function STP_getScriptInfo(aOffset) {
+  getScriptInfo: function(aOffset) {
     for (let { offset, length } of this._trees) {
       if (offset <= aOffset &&  offset + length >= aOffset) {
         return [offset, length];
       }
     }
     return [-1, -1];
   },
 
@@ -155,17 +148,17 @@ SyntaxTreesPool.prototype = {
    *
    * @param string aFunction
    *        The function name to call on the SyntaxTree instances.
    * @param any aParams
    *        Any kind params to pass to the request function.
    * @return array
    *         The results given by all known syntax trees.
    */
-  _call: function STP__call(aFunction, aParams) {
+  _call: function(aFunction, aParams) {
     let results = [];
     let requestId = aFunction + aParams; // Cache all the things!
 
     if (this._cache.has(requestId)) {
       return this._cache.get(requestId);
     }
     for (let syntaxTree of this._trees) {
       try {
@@ -216,197 +209,96 @@ SyntaxTree.prototype = {
    *
    * @param string aSubstring
    *        The string to be contained in the function name (or inferred name).
    *        Can be an empty string to match all functions.
    * @return array
    *         All the matching function declarations and expressions, as
    *         { functionName, functionLocation ... } object hashes.
    */
-  getNamedFunctionDefinitions: function ST_getNamedFunctionDefinitions(aSubstring) {
+  getNamedFunctionDefinitions: function(aSubstring) {
     let lowerCaseToken = aSubstring.toLowerCase();
     let store = [];
 
     SyntaxTreeVisitor.walk(this.AST, {
       /**
        * Callback invoked for each function declaration node.
        * @param Node aNode
        */
-      onFunctionDeclaration: function STW_onFunctionDeclaration(aNode) {
+      onFunctionDeclaration: function(aNode) {
         let functionName = aNode.id.name;
         if (functionName.toLowerCase().contains(lowerCaseToken)) {
           store.push({
             functionName: functionName,
             functionLocation: aNode.loc
           });
         }
       },
 
       /**
        * Callback invoked for each function expression node.
        * @param Node aNode
        */
-      onFunctionExpression: function STW_onFunctionExpression(aNode) {
-        let parent = aNode._parent;
-        let functionName, inferredName, inferredChain, inferredLocation;
+      onFunctionExpression: function(aNode) {
+        // Function expressions don't necessarily have a name.
+        let functionName = aNode.id ? aNode.id.name : "";
+        let functionLocation = aNode.loc || null;
 
-        // Function expressions don't necessarily have a name.
-        if (aNode.id) {
-          functionName = aNode.id.name;
-        }
         // Infer the function's name from an enclosing syntax tree node.
-        if (parent) {
-          let inferredInfo = ParserHelpers.inferFunctionExpressionInfo(aNode);
-          inferredName = inferredInfo.name;
-          inferredChain = inferredInfo.chain;
-          inferredLocation = inferredInfo.loc;
-        }
+        let inferredInfo = ParserHelpers.inferFunctionExpressionInfo(aNode);
+        let inferredName = inferredInfo.name;
+        let inferredChain = inferredInfo.chain;
+        let inferredLocation = inferredInfo.loc;
+
         // Current node may be part of a larger assignment expression stack.
-        if (parent.type == "AssignmentExpression") {
-          this.onFunctionExpression(parent);
+        if (aNode._parent.type == "AssignmentExpression") {
+          this.onFunctionExpression(aNode._parent);
         }
 
         if ((functionName && functionName.toLowerCase().contains(lowerCaseToken)) ||
             (inferredName && inferredName.toLowerCase().contains(lowerCaseToken))) {
           store.push({
             functionName: functionName,
-            functionLocation: aNode.loc,
+            functionLocation: functionLocation,
             inferredName: inferredName,
             inferredChain: inferredChain,
             inferredLocation: inferredLocation
           });
         }
       },
 
       /**
        * Callback invoked for each arrow expression node.
        * @param Node aNode
        */
-      onArrowExpression: function STW_onArrowExpression(aNode) {
-        let parent = aNode._parent;
-        let inferredName, inferredChain, inferredLocation;
-
+      onArrowExpression: function(aNode) {
         // Infer the function's name from an enclosing syntax tree node.
         let inferredInfo = ParserHelpers.inferFunctionExpressionInfo(aNode);
-        inferredName = inferredInfo.name;
-        inferredChain = inferredInfo.chain;
-        inferredLocation = inferredInfo.loc;
+        let inferredName = inferredInfo.name;
+        let inferredChain = inferredInfo.chain;
+        let inferredLocation = inferredInfo.loc;
 
         // Current node may be part of a larger assignment expression stack.
-        if (parent.type == "AssignmentExpression") {
-          this.onFunctionExpression(parent);
+        if (aNode._parent.type == "AssignmentExpression") {
+          this.onFunctionExpression(aNode._parent);
         }
 
         if (inferredName && inferredName.toLowerCase().contains(lowerCaseToken)) {
           store.push({
             inferredName: inferredName,
             inferredChain: inferredChain,
             inferredLocation: inferredLocation
           });
         }
       }
     });
 
     return store;
   },
 
-  /**
-   * Gets the "new" or "call" expression at the specified location.
-   *
-   * @param number aLine
-   *        The line in the source.
-   * @param number aColumn
-   *        The column in the source.
-   * @return object
-   *         An { functionName, functionLocation } object hash,
-   *         or null if nothing is found at the specified location.
-   */
-  getFunctionAtLocation: function STW_getFunctionAtLocation([aLine, aColumn]) {
-    let self = this;
-    let func = null;
-
-    SyntaxTreeVisitor.walk(this.AST, {
-      /**
-       * Callback invoked for each node.
-       * @param Node aNode
-       */
-      onNode: function STW_onNode(aNode) {
-        // Make sure the node is part of a branch that's guaranteed to be
-        // hovered. Otherwise, return true to abruptly halt walking this
-        // syntax tree branch. This is a really efficient optimization.
-        return ParserHelpers.isWithinLines(aNode, aLine);
-      },
-
-      /**
-       * Callback invoked for each identifier node.
-       * @param Node aNode
-       */
-      onIdentifier: function STW_onIdentifier(aNode) {
-        // Make sure the identifier itself is hovered.
-        let hovered = ParserHelpers.isWithinBounds(aNode, aLine, aColumn);
-        if (!hovered) {
-          return;
-        }
-
-        // Make sure the identifier is part of a "new" expression or
-        // "call" expression node.
-        let expression = ParserHelpers.getEnclosingFunctionExpression(aNode);
-        if (!expression) {
-          return;
-        }
-
-        // Found an identifier node that is part of a "new" expression or
-        // "call" expression node. However, it may be an argument, not a callee.
-        if (ParserHelpers.isFunctionCalleeArgument(aNode)) {
-          // It's an argument.
-          if (self.functionIdentifiersCache.has(aNode.name)) {
-            // It's a function as an argument.
-            func = {
-              functionName: aNode.name,
-              functionLocation: aNode.loc || aNode._parent.loc
-            };
-          }
-          return;
-        }
-
-        // Found a valid "new" expression or "call" expression node.
-        func = {
-          functionName: aNode.name,
-          functionLocation: ParserHelpers.getFunctionCalleeInfo(expression).loc
-        };
-
-        // Abruptly halt walking the syntax tree.
-        this.break = true;
-      }
-    });
-
-    return func;
-  },
-
-  /**
-   * Gets all the function identifiers in this syntax tree (both the
-   * function names and their inferred names).
-   *
-   * @return array
-   *         An array of strings.
-   */
-  get functionIdentifiersCache() {
-    if (this._functionIdentifiersCache) {
-      return this._functionIdentifiersCache;
-    }
-    let functionDefinitions = this.getNamedFunctionDefinitions("");
-    let functionIdentifiers = new Set();
-
-    for (let { functionName, inferredName } of functionDefinitions) {
-      functionIdentifiers.add(functionName);
-      functionIdentifiers.add(inferredName);
-    }
-    return this._functionIdentifiersCache = functionIdentifiers;
-  },
-
   AST: null,
   url: "",
   length: 0,
   offset: 0
 };
 
 /**
  * Parser utility methods.
@@ -417,17 +309,17 @@ let ParserHelpers = {
    *
    * @param Node aNode
    *        The node's bounds used as reference.
    * @param number aLine
    *        The line number to check.
    * @return boolean
    *         True if the line and column is contained in the node's bounds.
    */
-  isWithinLines: function PH_isWithinLines(aNode, aLine) {
+  isWithinLines: function(aNode, aLine) {
     // Not all nodes have location information attached.
     if (!aNode.loc) {
       return this.isWithinLines(aNode._parent, aLine);
     }
     return aNode.loc.start.line <= aLine && aNode.loc.end.line >= aLine;
   },
 
   /**
@@ -437,37 +329,37 @@ let ParserHelpers = {
    *        The node's bounds used as reference.
    * @param number aLine
    *        The line number to check.
    * @param number aColumn
    *        The column number to check.
    * @return boolean
    *         True if the line and column is contained in the node's bounds.
    */
-  isWithinBounds: function PH_isWithinBounds(aNode, aLine, aColumn) {
+  isWithinBounds: function(aNode, aLine, aColumn) {
     // Not all nodes have location information attached.
     if (!aNode.loc) {
       return this.isWithinBounds(aNode._parent, aLine, aColumn);
     }
     return aNode.loc.start.line == aLine && aNode.loc.end.line == aLine &&
            aNode.loc.start.column <= aColumn && aNode.loc.end.column >= aColumn;
   },
 
   /**
    * Try to infer a function expression's name & other details based on the
-   * enclosing VariableDeclarator, AssignmentExpression or ObjectExpression node.
+   * enclosing VariableDeclarator, AssignmentExpression or ObjectExpression.
    *
    * @param Node aNode
    *        The function expression node to get the name for.
    * @return object
-   *         The inferred function name, or empty string can't infer name,
+   *         The inferred function name, or empty string can't infer the name,
    *         along with the chain (a generic "context", like a prototype chain)
    *         and location if available.
    */
-  inferFunctionExpressionInfo: function PH_inferFunctionExpressionInfo(aNode) {
+  inferFunctionExpressionInfo: function(aNode) {
     let parent = aNode._parent;
 
     // A function expression may be defined in a variable declarator,
     // e.g. var foo = function(){}, in which case it is possible to infer
     // the variable name.
     if (parent.type == "VariableDeclarator") {
       return {
         name: parent.id.name,
@@ -475,220 +367,147 @@ let ParserHelpers = {
         loc: parent.loc
       };
     }
 
     // Function expressions can also be defined in assignment expressions,
     // e.g. foo = function(){} or foo.bar = function(){}, in which case it is
     // possible to infer the assignee name ("foo" and "bar" respectively).
     if (parent.type == "AssignmentExpression") {
-      let assigneeChain = this.getAssignmentExpressionAssigneeChain(parent);
-      let assigneeLeaf = assigneeChain.pop();
+      let propertyChain = this.getMemberExpressionPropertyChain(parent.left);
+      let propertyLeaf = propertyChain.pop();
       return {
-        name: assigneeLeaf,
-        chain: assigneeChain,
+        name: propertyLeaf,
+        chain: propertyChain,
         loc: parent.left.loc
       };
     }
 
     // If a function expression is defined in an object expression,
     // e.g. { foo: function(){} }, then it is possible to infer the name
     // from the corresponding property.
     if (parent.type == "ObjectExpression") {
-      let propertyDetails = this.getObjectExpressionPropertyKeyForValue(aNode);
+      let propertyKey = this.getObjectExpressionPropertyKeyForValue(aNode);
       let propertyChain = this.getObjectExpressionPropertyChain(parent);
-      let propertyLeaf = propertyDetails.name;
+      let propertyLeaf = propertyKey.name;
       return {
         name: propertyLeaf,
         chain: propertyChain,
-        loc: propertyDetails.loc
+        loc: propertyKey.loc
       };
     }
 
     // Can't infer the function expression's name.
     return {
       name: "",
       chain: null,
       loc: null
     };
   },
 
   /**
-   * Gets details about an object expression's property to which a specified
-   * value is assigned. For example, the node returned for the value 42 in
-   * "{ foo: { bar: 42 } }" is "bar".
+   * Gets the name of an object expression's property to which a specified
+   * value is assigned.
+   *
+   * For example, if aNode represents the "bar" identifier in a hypothetical
+   * "{ foo: bar }" object expression, the returned node is the "foo" identifier.
    *
    * @param Node aNode
-   *        The value node assigned to a property in an object expression.
+   *        The value node in an object expression.
    * @return object
-   *         The details about the assignee property node.
+   *         The key identifier node in the object expression.
    */
-  getObjectExpressionPropertyKeyForValue:
-  function PH_getObjectExpressionPropertyKeyForValue(aNode) {
+  getObjectExpressionPropertyKeyForValue: function(aNode) {
     let parent = aNode._parent;
     if (parent.type != "ObjectExpression") {
       return null;
     }
     for (let property of parent.properties) {
       if (property.value == aNode) {
         return property.key;
       }
     }
   },
 
   /**
-   * Gets an object expression property chain to its parent variable declarator.
-   * For example, the chain to "baz" in "foo = { bar: { baz: { } } }" is
-   * ["foo", "bar", "baz"].
+   * Gets an object expression's property chain to its parent
+   * variable declarator or assignment expression, if available.
+   *
+   * For example, if aNode represents the "baz: {}" object expression in a
+   * hypothetical "foo = { bar: { baz: {} } }" assignment expression, the
+   * returned chain is ["foo", "bar", "baz"].
    *
    * @param Node aNode
    *        The object expression node to begin the scan from.
    * @param array aStore [optional]
    *        The chain to store the nodes into.
    * @return array
    *         The chain to the parent variable declarator, as strings.
    */
-  getObjectExpressionPropertyChain:
-  function PH_getObjectExpressionPropertyChain(aNode, aStore = []) {
+  getObjectExpressionPropertyChain: function(aNode, aStore = []) {
     switch (aNode.type) {
       case "ObjectExpression":
         this.getObjectExpressionPropertyChain(aNode._parent, aStore);
-
-        let propertyDetails = this.getObjectExpressionPropertyKeyForValue(aNode);
-        if (propertyDetails) {
-          aStore.push(this.getObjectExpressionPropertyKeyForValue(aNode).name);
+        let propertyKey = this.getObjectExpressionPropertyKeyForValue(aNode);
+        if (propertyKey) {
+          aStore.push(propertyKey.name);
         }
         break;
-      // Handle "foo.bar = { ... }" since it's commonly used when defining an
-      // object's prototype methods; for example: "Foo.prototype = { ... }".
+      // Handle "var foo = { ... }" variable declarators.
+      case "VariableDeclarator":
+        aStore.push(aNode.id.name);
+        break;
+      // Handle "foo.bar = { ... }" assignment expressions, since they're
+      // commonly used when defining an object's prototype methods; e.g:
+      // "Foo.prototype = { ... }".
       case "AssignmentExpression":
-        this.getAssignmentExpressionAssigneeChain(aNode, aStore);
+        this.getMemberExpressionPropertyChain(aNode.left, aStore);
         break;
       // Additionally handle stuff like "foo = bar.baz({ ... })", because it's
-      // commonly used in prototype-based inheritance in many libraries;
-      // for example: "Foo.Bar = Baz.extend({ ... })".
+      // commonly used in prototype-based inheritance in many libraries; e.g:
+      // "Foo = Bar.extend({ ... })".
       case "NewExpression":
       case "CallExpression":
         this.getObjectExpressionPropertyChain(aNode._parent, aStore);
         break;
-      // End of the chain.
-      case "VariableDeclarator":
-        aStore.push(aNode.id.name);
-        break;
     }
     return aStore;
   },
 
   /**
-   * Gets the assignee property chain in an assignment expression.
-   * For example, the chain in "foo.bar.baz = 42" is ["foo", "bar", "baz"].
+   * Gets a member expression's property chain.
+   *
+   * For example, if aNode represents a hypothetical "foo.bar.baz"
+   * member expression, the returned chain ["foo", "bar", "baz"].
+   *
+   * More complex expressions like foo.bar().baz are intentionally not handled.
    *
    * @param Node aNode
-   *        The assignment expression node to begin the scan from.
-   * @param array aStore
-   *        The chain to store the nodes into.
+   *        The member expression node to begin the scan from.
    * @param array aStore [optional]
    *        The chain to store the nodes into.
    * @return array
-   *         The full assignee chain, as strings.
+   *         The full member chain, as strings.
    */
-  getAssignmentExpressionAssigneeChain:
-  function PH_getAssignmentExpressionAssigneeChain(aNode, aStore = []) {
+  getMemberExpressionPropertyChain: function(aNode, aStore = []) {
     switch (aNode.type) {
-      case "AssignmentExpression":
-        this.getAssignmentExpressionAssigneeChain(aNode.left, aStore);
-        break;
       case "MemberExpression":
-        this.getAssignmentExpressionAssigneeChain(aNode.object, aStore);
-        this.getAssignmentExpressionAssigneeChain(aNode.property, aStore);
+        this.getMemberExpressionPropertyChain(aNode.object, aStore);
+        this.getMemberExpressionPropertyChain(aNode.property, aStore);
         break;
       case "ThisExpression":
         // Such expressions may appear in an assignee chain, for example
         // "this.foo.bar = baz", however it seems better to ignore such nodes
         // and limit the chain to ["foo", "bar"].
         break;
       case "Identifier":
         aStore.push(aNode.name);
         break;
     }
     return aStore;
-  },
-
-  /**
-   * Gets the "new" expression or "call" expression containing the specified
-   * node. If the node is not enclosed in either of these expression types,
-   * null is returned.
-   *
-   * @param Node aNode
-   *        The child node of an enclosing "new" expression or "call" expression.
-   * @return Node
-   *         The enclosing "new" expression or "call" expression node, or
-   *         null if nothing is found.
-   */
-  getEnclosingFunctionExpression:
-  function PH_getEnclosingFunctionExpression(aNode) {
-    switch (aNode.type) {
-      case "NewExpression":
-      case "CallExpression":
-        return aNode;
-      case "MemberExpression":
-      case "Identifier":
-        return this.getEnclosingFunctionExpression(aNode._parent);
-      default:
-        return null;
-    }
-  },
-
-  /**
-   * Gets the name and { line, column } location of a "new" expression or
-   * "call" expression's callee node.
-   *
-   * @param Node aNode
-   *        The "new" expression or "call" expression to get the callee info for.
-   * @return object
-   *         An object containing the name and location as properties, or
-   *         null if nothing is found.
-   */
-  getFunctionCalleeInfo: function PH_getFunctionCalleeInfo(aNode) {
-    switch (aNode.type) {
-      case "NewExpression":
-      case "CallExpression":
-        return this.getFunctionCalleeInfo(aNode.callee);
-      case "MemberExpression":
-        return this.getFunctionCalleeInfo(aNode.property);
-      case "Identifier":
-        return {
-          name: aNode.name,
-          loc: aNode.loc || (aNode._parent || {}).loc
-        };
-      default:
-        return null;
-    }
-  },
-
-  /**
-   * Determines if an identifier node is part of a "new" expression or
-   * "call" expression's callee arguments.
-   *
-   * @param Node aNode
-   *        The node to determine if part of a function's arguments.
-   * @return boolean
-   *         True if the identifier is an argument, false otherwise.
-   */
-  isFunctionCalleeArgument: function PH_isFunctionCalleeArgument(aNode) {
-    if (!aNode._parent) {
-      return false;
-    }
-    switch (aNode._parent.type) {
-      case "NewExpression":
-      case "CallExpression":
-        return aNode._parent.arguments.indexOf(aNode) != -1;
-      default:
-        return this.isFunctionCalleeArgument(aNode._parent);
-    }
   }
 };
 
 /**
  * A visitor for a syntax tree generated by the reflection API.
  * See https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API.
  *
  * All node types implement the following interface:
@@ -702,17 +521,17 @@ let SyntaxTreeVisitor = {
    * Walks a syntax tree.
    *
    * @param object aTree
    *        The AST nodes generated by the reflection API
    * @param object aCallbacks
    *        A map of all the callbacks to invoke when passing through certain
    *        types of noes (e.g: onFunctionDeclaration, onBlockStatement etc.).
    */
-  walk: function STV_walk(aTree, aCallbacks) {
+  walk: function(aTree, aCallbacks) {
     this[aTree.type](aTree, aCallbacks);
   },
 
   /**
    * A flag checked on each node in the syntax tree. If true, walking is
    * abruptly halted.
    */
   break: false,
@@ -720,31 +539,31 @@ let SyntaxTreeVisitor = {
   /**
    * A complete program source tree.
    *
    * interface Program <: Node {
    *   type: "Program";
    *   body: [ Statement ];
    * }
    */
-  Program: function STV_Program(aNode, aCallbacks) {
+  Program: function(aNode, aCallbacks) {
     if (aCallbacks.onProgram) {
       aCallbacks.onProgram(aNode);
     }
     for (let statement of aNode.body) {
       this[statement.type](statement, aNode, aCallbacks);
     }
   },
 
   /**
    * Any statement.
    *
    * interface Statement <: Node { }
    */
-  Statement: function STV_Statement(aNode, aParent, aCallbacks) {
+  Statement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -757,17 +576,17 @@ let SyntaxTreeVisitor = {
 
   /**
    * An empty statement, i.e., a solitary semicolon.
    *
    * interface EmptyStatement <: Statement {
    *   type: "EmptyStatement";
    * }
    */
-  EmptyStatement: function STV_EmptyStatement(aNode, aParent, aCallbacks) {
+  EmptyStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -781,17 +600,17 @@ let SyntaxTreeVisitor = {
   /**
    * A block statement, i.e., a sequence of statements surrounded by braces.
    *
    * interface BlockStatement <: Statement {
    *   type: "BlockStatement";
    *   body: [ Statement ];
    * }
    */
-  BlockStatement: function STV_BlockStatement(aNode, aParent, aCallbacks) {
+  BlockStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -808,17 +627,17 @@ let SyntaxTreeVisitor = {
   /**
    * An expression statement, i.e., a statement consisting of a single expression.
    *
    * interface ExpressionStatement <: Statement {
    *   type: "ExpressionStatement";
    *   expression: Expression;
    * }
    */
-  ExpressionStatement: function STV_ExpressionStatement(aNode, aParent, aCallbacks) {
+  ExpressionStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -835,17 +654,17 @@ let SyntaxTreeVisitor = {
    *
    * interface IfStatement <: Statement {
    *   type: "IfStatement";
    *   test: Expression;
    *   consequent: Statement;
    *   alternate: Statement | null;
    * }
    */
-  IfStatement: function STV_IfStatement(aNode, aParent, aCallbacks) {
+  IfStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -865,17 +684,17 @@ let SyntaxTreeVisitor = {
    * A labeled statement, i.e., a statement prefixed by a break/continue label.
    *
    * interface LabeledStatement <: Statement {
    *   type: "LabeledStatement";
    *   label: Identifier;
    *   body: Statement;
    * }
    */
-  LabeledStatement: function STV_LabeledStatement(aNode, aParent, aCallbacks) {
+  LabeledStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -891,17 +710,17 @@ let SyntaxTreeVisitor = {
   /**
    * A break statement.
    *
    * interface BreakStatement <: Statement {
    *   type: "BreakStatement";
    *   label: Identifier | null;
    * }
    */
-  BreakStatement: function STV_BreakStatement(aNode, aParent, aCallbacks) {
+  BreakStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -918,17 +737,17 @@ let SyntaxTreeVisitor = {
   /**
    * A continue statement.
    *
    * interface ContinueStatement <: Statement {
    *   type: "ContinueStatement";
    *   label: Identifier | null;
    * }
    */
-  ContinueStatement: function STV_ContinueStatement(aNode, aParent, aCallbacks) {
+  ContinueStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -946,17 +765,17 @@ let SyntaxTreeVisitor = {
    * A with statement.
    *
    * interface WithStatement <: Statement {
    *   type: "WithStatement";
    *   object: Expression;
    *   body: Statement;
    * }
    */
-  WithStatement: function STV_WithStatement(aNode, aParent, aCallbacks) {
+  WithStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -976,17 +795,17 @@ let SyntaxTreeVisitor = {
    *
    * interface SwitchStatement <: Statement {
    *   type: "SwitchStatement";
    *   discriminant: Expression;
    *   cases: [ SwitchCase ];
    *   lexical: boolean;
    * }
    */
-  SwitchStatement: function STV_SwitchStatement(aNode, aParent, aCallbacks) {
+  SwitchStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1004,17 +823,17 @@ let SyntaxTreeVisitor = {
   /**
    * A return statement.
    *
    * interface ReturnStatement <: Statement {
    *   type: "ReturnStatement";
    *   argument: Expression | null;
    * }
    */
-  ReturnStatement: function STV_ReturnStatement(aNode, aParent, aCallbacks) {
+  ReturnStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1031,17 +850,17 @@ let SyntaxTreeVisitor = {
   /**
    * A throw statement.
    *
    * interface ThrowStatement <: Statement {
    *   type: "ThrowStatement";
    *   argument: Expression;
    * }
    */
-  ThrowStatement: function STV_ThrowStatement(aNode, aParent, aCallbacks) {
+  ThrowStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1059,17 +878,17 @@ let SyntaxTreeVisitor = {
    * interface TryStatement <: Statement {
    *   type: "TryStatement";
    *   block: BlockStatement;
    *   handler: CatchClause | null;
    *   guardedHandlers: [ CatchClause ];
    *   finalizer: BlockStatement | null;
    * }
    */
-  TryStatement: function STV_TryStatement(aNode, aParent, aCallbacks) {
+  TryStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1094,17 +913,17 @@ let SyntaxTreeVisitor = {
    * A while statement.
    *
    * interface WhileStatement <: Statement {
    *   type: "WhileStatement";
    *   test: Expression;
    *   body: Statement;
    * }
    */
-  WhileStatement: function STV_WhileStatement(aNode, aParent, aCallbacks) {
+  WhileStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1121,17 +940,17 @@ let SyntaxTreeVisitor = {
    * A do/while statement.
    *
    * interface DoWhileStatement <: Statement {
    *   type: "DoWhileStatement";
    *   body: Statement;
    *   test: Expression;
    * }
    */
-  DoWhileStatement: function STV_DoWhileStatement(aNode, aParent, aCallbacks) {
+  DoWhileStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1150,17 +969,17 @@ let SyntaxTreeVisitor = {
    * interface ForStatement <: Statement {
    *   type: "ForStatement";
    *   init: VariableDeclaration | Expression | null;
    *   test: Expression | null;
    *   update: Expression | null;
    *   body: Statement;
    * }
    */
-  ForStatement: function STV_ForStatement(aNode, aParent, aCallbacks) {
+  ForStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1187,17 +1006,17 @@ let SyntaxTreeVisitor = {
    * interface ForInStatement <: Statement {
    *   type: "ForInStatement";
    *   left: VariableDeclaration | Expression;
    *   right: Expression;
    *   body: Statement;
    *   each: boolean;
    * }
    */
-  ForInStatement: function STV_ForInStatement(aNode, aParent, aCallbacks) {
+  ForInStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1216,17 +1035,17 @@ let SyntaxTreeVisitor = {
    *
    * interface ForOfStatement <: Statement {
    *   type: "ForOfStatement";
    *   left: VariableDeclaration | Expression;
    *   right: Expression;
    *   body: Statement;
    * }
    */
-  ForOfStatement: function STV_ForOfStatement(aNode, aParent, aCallbacks) {
+  ForOfStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1244,17 +1063,17 @@ let SyntaxTreeVisitor = {
    * A let statement.
    *
    * interface LetStatement <: Statement {
    *   type: "LetStatement";
    *   head: [ { id: Pattern, init: Expression | null } ];
    *   body: Statement;
    * }
    */
-  LetStatement: function STV_LetStatement(aNode, aParent, aCallbacks) {
+  LetStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1274,17 +1093,17 @@ let SyntaxTreeVisitor = {
 
   /**
    * A debugger statement.
    *
    * interface DebuggerStatement <: Statement {
    *   type: "DebuggerStatement";
    * }
    */
-  DebuggerStatement: function STV_DebuggerStatement(aNode, aParent, aCallbacks) {
+  DebuggerStatement: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1297,17 +1116,17 @@ let SyntaxTreeVisitor = {
 
   /**
    * Any declaration node. Note that declarations are considered statements;
    * this is because declarations can appear in any statement context in the
    * language recognized by the SpiderMonkey parser.
    *
    * interface Declaration <: Statement { }
    */
-  Declaration: function STV_Declaration(aNode, aParent, aCallbacks) {
+  Declaration: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1327,17 +1146,17 @@ let SyntaxTreeVisitor = {
    *   params: [ Pattern ];
    *   defaults: [ Expression ];
    *   rest: Identifier | null;
    *   body: BlockStatement | Expression;
    *   generator: boolean;
    *   expression: boolean;
    * }
    */
-  FunctionDeclaration: function STV_FunctionDeclaration(aNode, aParent, aCallbacks) {
+  FunctionDeclaration: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1363,17 +1182,17 @@ let SyntaxTreeVisitor = {
    * A variable declaration, via one of var, let, or const.
    *
    * interface VariableDeclaration <: Declaration {
    *   type: "VariableDeclaration";
    *   declarations: [ VariableDeclarator ];
    *   kind: "var" | "let" | "const";
    * }
    */
-  VariableDeclaration: function STV_VariableDeclaration(aNode, aParent, aCallbacks) {
+  VariableDeclaration: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1391,17 +1210,17 @@ let SyntaxTreeVisitor = {
    * A variable declarator.
    *
    * interface VariableDeclarator <: Node {
    *   type: "VariableDeclarator";
    *   id: Pattern;
    *   init: Expression | null;
    * }
    */
-  VariableDeclarator: function STV_VariableDeclarator(aNode, aParent, aCallbacks) {
+  VariableDeclarator: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1417,17 +1236,17 @@ let SyntaxTreeVisitor = {
   },
 
   /**
    * Any expression node. Since the left-hand side of an assignment may be any
    * expression in general, an expression can also be a pattern.
    *
    * interface Expression <: Node, Pattern { }
    */
-  Expression: function STV_Expression(aNode, aParent, aCallbacks) {
+  Expression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1440,17 +1259,17 @@ let SyntaxTreeVisitor = {
 
   /**
    * A this expression.
    *
    * interface ThisExpression <: Expression {
    *   type: "ThisExpression";
    * }
    */
-  ThisExpression: function STV_ThisExpression(aNode, aParent, aCallbacks) {
+  ThisExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1464,17 +1283,17 @@ let SyntaxTreeVisitor = {
   /**
    * An array expression.
    *
    * interface ArrayExpression <: Expression {
    *   type: "ArrayExpression";
    *   elements: [ Expression | null ];
    * }
    */
-  ArrayExpression: function STV_ArrayExpression(aNode, aParent, aCallbacks) {
+  ArrayExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1500,17 +1319,17 @@ let SyntaxTreeVisitor = {
    *
    * interface ObjectExpression <: Expression {
    *   type: "ObjectExpression";
    *   properties: [ { key: Literal | Identifier,
    *                   value: Expression,
    *                   kind: "init" | "get" | "set" } ];
    * }
    */
-  ObjectExpression: function STV_ObjectExpression(aNode, aParent, aCallbacks) {
+  ObjectExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1534,17 +1353,17 @@ let SyntaxTreeVisitor = {
    *   params: [ Pattern ];
    *   defaults: [ Expression ];
    *   rest: Identifier | null;
    *   body: BlockStatement | Expression;
    *   generator: boolean;
    *   expression: boolean;
    * }
    */
-  FunctionExpression: function STV_FunctionExpression(aNode, aParent, aCallbacks) {
+  FunctionExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1576,17 +1395,17 @@ let SyntaxTreeVisitor = {
    *   params: [ Pattern ];
    *   defaults: [ Expression ];
    *   rest: Identifier | null;
    *   body: BlockStatement | Expression;
    *   generator: boolean;
    *   expression: boolean;
    * }
    */
-  ArrowExpression: function STV_ArrowExpression(aNode, aParent, aCallbacks) {
+  ArrowExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1610,17 +1429,17 @@ let SyntaxTreeVisitor = {
   /**
    * A sequence expression, i.e., a comma-separated sequence of expressions.
    *
    * interface SequenceExpression <: Expression {
    *   type: "SequenceExpression";
    *   expressions: [ Expression ];
    * }
    */
-  SequenceExpression: function STV_SequenceExpression(aNode, aParent, aCallbacks) {
+  SequenceExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1639,17 +1458,17 @@ let SyntaxTreeVisitor = {
    *
    * interface UnaryExpression <: Expression {
    *   type: "UnaryExpression";
    *   operator: UnaryOperator;
    *   prefix: boolean;
    *   argument: Expression;
    * }
    */
-  UnaryExpression: function STV_UnaryExpression(aNode, aParent, aCallbacks) {
+  UnaryExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1666,17 +1485,17 @@ let SyntaxTreeVisitor = {
    *
    * interface BinaryExpression <: Expression {
    *   type: "BinaryExpression";
    *   operator: BinaryOperator;
    *   left: Expression;
    *   right: Expression;
    * }
    */
-  BinaryExpression: function STV_BinaryExpression(aNode, aParent, aCallbacks) {
+  BinaryExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1694,17 +1513,17 @@ let SyntaxTreeVisitor = {
    *
    * interface AssignmentExpression <: Expression {
    *   type: "AssignmentExpression";
    *   operator: AssignmentOperator;
    *   left: Expression;
    *   right: Expression;
    * }
    */
-  AssignmentExpression: function STV_AssignmentExpression(aNode, aParent, aCallbacks) {
+  AssignmentExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1722,17 +1541,17 @@ let SyntaxTreeVisitor = {
    *
    * interface UpdateExpression <: Expression {
    *   type: "UpdateExpression";
    *   operator: UpdateOperator;
    *   argument: Expression;
    *   prefix: boolean;
    * }
    */
-  UpdateExpression: function STV_UpdateExpression(aNode, aParent, aCallbacks) {
+  UpdateExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1749,17 +1568,17 @@ let SyntaxTreeVisitor = {
    *
    * interface LogicalExpression <: Expression {
    *   type: "LogicalExpression";
    *   operator: LogicalOperator;
    *   left: Expression;
    *   right: Expression;
    * }
    */
-  LogicalExpression: function STV_LogicalExpression(aNode, aParent, aCallbacks) {
+  LogicalExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1777,17 +1596,17 @@ let SyntaxTreeVisitor = {
    *
    * interface ConditionalExpression <: Expression {
    *   type: "ConditionalExpression";
    *   test: Expression;
    *   alternate: Expression;
    *   consequent: Expression;
    * }
    */
-  ConditionalExpression: function STV_ConditionalExpression(aNode, aParent, aCallbacks) {
+  ConditionalExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1805,17 +1624,17 @@ let SyntaxTreeVisitor = {
    * A new expression.
    *
    * interface NewExpression <: Expression {
    *   type: "NewExpression";
    *   callee: Expression;
    *   arguments: [ Expression | null ];
    * }
    */
-  NewExpression: function STV_NewExpression(aNode, aParent, aCallbacks) {
+  NewExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1836,17 +1655,17 @@ let SyntaxTreeVisitor = {
    * A function or method call expression.
    *
    * interface CallExpression <: Expression {
    *   type: "CallExpression";
    *   callee: Expression;
    *   arguments: [ Expression | null ];
    * }
    */
-  CallExpression: function STV_CallExpression(aNode, aParent, aCallbacks) {
+  CallExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1871,17 +1690,17 @@ let SyntaxTreeVisitor = {
    *
    * interface MemberExpression <: Expression {
    *   type: "MemberExpression";
    *   object: Expression;
    *   property: Identifier | Expression;
    *   computed: boolean;
    * }
    */
-  MemberExpression: function STV_MemberExpression(aNode, aParent, aCallbacks) {
+  MemberExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1896,17 +1715,17 @@ let SyntaxTreeVisitor = {
 
   /**
    * A yield expression.
    *
    * interface YieldExpression <: Expression {
    *   argument: Expression | null;
    * }
    */
-  YieldExpression: function STV_YieldExpression(aNode, aParent, aCallbacks) {
+  YieldExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1926,17 +1745,17 @@ let SyntaxTreeVisitor = {
    * final if clause, if present.
    *
    * interface ComprehensionExpression <: Expression {
    *   body: Expression;
    *   blocks: [ ComprehensionBlock ];
    *   filter: Expression | null;
    * }
    */
-  ComprehensionExpression: function STV_ComprehensionExpression(aNode, aParent, aCallbacks) {
+  ComprehensionExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1960,17 +1779,17 @@ let SyntaxTreeVisitor = {
    * filter expression corresponds to the final if clause, if present.
    *
    * interface GeneratorExpression <: Expression {
    *   body: Expression;
    *   blocks: [ ComprehensionBlock ];
    *   filter: Expression | null;
    * }
    */
-  GeneratorExpression: function STV_GeneratorExpression(aNode, aParent, aCallbacks) {
+  GeneratorExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -1991,17 +1810,17 @@ let SyntaxTreeVisitor = {
   /**
    * A graph expression, aka "sharp literal," such as #1={ self: #1# }.
    *
    * interface GraphExpression <: Expression {
    *   index: uint32;
    *   expression: Literal;
    * }
    */
-  GraphExpression: function STV_GraphExpression(aNode, aParent, aCallbacks) {
+  GraphExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2015,17 +1834,17 @@ let SyntaxTreeVisitor = {
 
   /**
    * A graph index expression, aka "sharp variable," such as #1#.
    *
    * interface GraphIndexExpression <: Expression {
    *   index: uint32;
    * }
    */
-  GraphIndexExpression: function STV_GraphIndexExpression(aNode, aParent, aCallbacks) {
+  GraphIndexExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2040,17 +1859,17 @@ let SyntaxTreeVisitor = {
    * A let expression.
    *
    * interface LetExpression <: Expression {
    *   type: "LetExpression";
    *   head: [ { id: Pattern, init: Expression | null } ];
    *   body: Expression;
    * }
    */
-  LetExpression: function STV_LetExpression(aNode, aParent, aCallbacks) {
+  LetExpression: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2068,17 +1887,17 @@ let SyntaxTreeVisitor = {
     this[aNode.body.type](aNode.body, aNode, aCallbacks);
   },
 
   /**
    * Any pattern.
    *
    * interface Pattern <: Node { }
    */
-  Pattern: function STV_Pattern(aNode, aParent, aCallbacks) {
+  Pattern: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2093,17 +1912,17 @@ let SyntaxTreeVisitor = {
    * An object-destructuring pattern. A literal property in an object pattern
    * can have either a string or number as its value.
    *
    * interface ObjectPattern <: Pattern {
    *   type: "ObjectPattern";
    *   properties: [ { key: Literal | Identifier, value: Pattern } ];
    * }
    */
-  ObjectPattern: function STV_ObjectPattern(aNode, aParent, aCallbacks) {
+  ObjectPattern: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2121,17 +1940,17 @@ let SyntaxTreeVisitor = {
   /**
    * An array-destructuring pattern.
    *
    * interface ArrayPattern <: Pattern {
    *   type: "ArrayPattern";
    *   elements: [ Pattern | null ];
    * }
    */
-  ArrayPattern: function STV_ArrayPattern(aNode, aParent, aCallbacks) {
+  ArrayPattern: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2152,17 +1971,17 @@ let SyntaxTreeVisitor = {
    * the body of a switch statement.
    *
    * interface SwitchCase <: Node {
    *   type: "SwitchCase";
    *   test: Expression | null;
    *   consequent: [ Statement ];
    * }
    */
-  SwitchCase: function STV_SwitchCase(aNode, aParent, aCallbacks) {
+  SwitchCase: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2185,17 +2004,17 @@ let SyntaxTreeVisitor = {
    *
    * interface CatchClause <: Node {
    *   type: "CatchClause";
    *   param: Pattern;
    *   guard: Expression | null;
    *   body: BlockStatement;
    * }
    */
-  CatchClause: function STV_CatchClause(aNode, aParent, aCallbacks) {
+  CatchClause: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2215,17 +2034,17 @@ let SyntaxTreeVisitor = {
    * A for or for each block in an array comprehension or generator expression.
    *
    * interface ComprehensionBlock <: Node {
    *   left: Pattern;
    *   right: Expression;
    *   each: boolean;
    * }
    */
-  ComprehensionBlock: function STV_ComprehensionBlock(aNode, aParent, aCallbacks) {
+  ComprehensionBlock: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2242,17 +2061,17 @@ let SyntaxTreeVisitor = {
    * An identifier. Note that an identifier may be an expression or a
    * destructuring pattern.
    *
    * interface Identifier <: Node, Expression, Pattern {
    *   type: "Identifier";
    *   name: string;
    * }
    */
-  Identifier: function STV_Identifier(aNode, aParent, aCallbacks) {
+  Identifier: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;
@@ -2266,17 +2085,17 @@ let SyntaxTreeVisitor = {
   /**
    * A literal token. Note that a literal can be an expression.
    *
    * interface Literal <: Node, Expression {
    *   type: "Literal";
    *   value: string | boolean | null | number | RegExp;
    * }
    */
-  Literal: function STV_Literal(aNode, aParent, aCallbacks) {
+  Literal: function(aNode, aParent, aCallbacks) {
     aNode._parent = aParent;
 
     if (this.break) {
       return;
     }
     if (aCallbacks.onNode) {
       if (aCallbacks.onNode(aNode, aParent) === false) {
         return;