From 3eb4d5b46619eab58225580d59ada17c0b20d889 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sat, 17 Jan 2015 18:53:40 +1100 Subject: [PATCH] fix up styling of #518 --- lib/6to5/to-fast-properties.js | 1 + lib/6to5/types/index.js | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/6to5/to-fast-properties.js b/lib/6to5/to-fast-properties.js index 341a451d03..a7499fdff5 100644 --- a/lib/6to5/to-fast-properties.js +++ b/lib/6to5/to-fast-properties.js @@ -5,6 +5,7 @@ * Use %HasFastProperties(obj) and --allow-natives-syntax to check whether * a particular object already has fast properties. */ + module.exports = function toFastProperties(obj) { /*jshint -W027*/ function f() {} diff --git a/lib/6to5/types/index.js b/lib/6to5/types/index.js index 9155d41bd4..fb56afd02d 100644 --- a/lib/6to5/types/index.js +++ b/lib/6to5/types/index.js @@ -1,6 +1,6 @@ +var toFastProperties = require("../to-fast-properties"); var esutils = require("esutils"); var _ = require("lodash"); -var toFastProperties = require("../to-fast-properties"); var t = exports; @@ -15,6 +15,7 @@ t.NATIVE_TYPE_NAMES = ["Array", "Object", "Number", "Boolean", "Date", "Array", * @param {String} type * @param {Boolean?} skipAliasCheck */ + function registerType(type, skipAliasCheck) { var is = t["is" + type] = function (node, opts) { return t.is(type, node, opts, skipAliasCheck); @@ -65,6 +66,7 @@ _.each(t.FLIPPED_ALIAS_KEYS, function (types, type) { * @param {Boolean?} skipAliasCheck * @returns {Boolean} isOfType */ + t.is = function (type, node, opts, skipAliasCheck) { if (!node) return; @@ -545,10 +547,10 @@ t.inheritsComments = function (child, parent) { */ t.inherits = function (child, parent) { - child.loc = parent.loc; - child.end = parent.end; child.range = parent.range; child.start = parent.start; + child.loc = parent.loc; + child.end = parent.end; t.inheritsComments(child, parent); return child; }; @@ -576,4 +578,4 @@ t.isSpecifierDefault = function (specifier) { }; toFastProperties(t); -toFastProperties(t.VISITOR_KEYS); \ No newline at end of file +toFastProperties(t.VISITOR_KEYS);