From 5b6c222cd6b684e6a4de8e380ae6ecb7cc5259f0 Mon Sep 17 00:00:00 2001 From: Kevin Barabash Date: Thu, 13 Jul 2017 23:19:26 -0400 Subject: [PATCH] rename parseData.js to ParseNode.js and export ParseNode as the default --- src/{parseData.js => ParseNode.js} | 7 +------ src/Parser.js | 2 +- src/environments.js | 2 +- src/functions.js | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) rename src/{parseData.js => ParseNode.js} (94%) diff --git a/src/parseData.js b/src/ParseNode.js similarity index 94% rename from src/parseData.js rename to src/ParseNode.js index 5873bffd..bfbe4315 100644 --- a/src/parseData.js +++ b/src/ParseNode.js @@ -15,7 +15,7 @@ * @param {Token=} lastToken last token of the input for this node, * will default to firstToken if unset */ -class ParseNode { +export default class ParseNode { constructor(type, value, mode, firstToken, lastToken) { this.type = type; this.value = value; @@ -27,8 +27,3 @@ class ParseNode { } } } - -module.exports = { - ParseNode: ParseNode, -}; - diff --git a/src/Parser.js b/src/Parser.js index 07d3cf41..2a7a8656 100644 --- a/src/Parser.js +++ b/src/Parser.js @@ -5,7 +5,7 @@ import MacroExpander from "./MacroExpander"; import symbols from "./symbols"; import utils from "./utils"; import { cjkRegex } from "./unicodeRegexes"; -import { ParseNode } from "./parseData"; +import ParseNode from "./ParseNode"; import ParseError from "./ParseError"; /** diff --git a/src/environments.js b/src/environments.js index 0bc8a6d5..726941f7 100644 --- a/src/environments.js +++ b/src/environments.js @@ -1,5 +1,5 @@ /* eslint no-constant-condition:0 */ -import { ParseNode } from "./parseData"; +import ParseNode from "./ParseNode"; import ParseError from "./ParseError"; /** diff --git a/src/functions.js b/src/functions.js index d54e0685..1273d3bb 100644 --- a/src/functions.js +++ b/src/functions.js @@ -1,6 +1,6 @@ import utils from "./utils"; import ParseError from "./ParseError"; -import { ParseNode } from "./parseData"; +import ParseNode from "./ParseNode"; /* This file contains a list of functions that we parse, identified by * the calls to defineFunction.