From b9dd80a142aba4db60555226fc172a9d369caa1e Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Tue, 2 Dec 2014 20:10:56 -0500 Subject: [PATCH] Adding type values to node extensions These will be useful later --- src/js/parser/javascript/match.js | 1 + src/js/parser/javascript/regexp.js | 2 ++ src/js/parser/javascript/root.js | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/js/parser/javascript/match.js b/src/js/parser/javascript/match.js index 5e07243..442de8f 100644 --- a/src/js/parser/javascript/match.js +++ b/src/js/parser/javascript/match.js @@ -2,4 +2,5 @@ import _ from 'lodash'; import Base from './base.js'; export default _.extend({}, Base, { + type: 'match', }); diff --git a/src/js/parser/javascript/regexp.js b/src/js/parser/javascript/regexp.js index 9b08a0d..17834eb 100644 --- a/src/js/parser/javascript/regexp.js +++ b/src/js/parser/javascript/regexp.js @@ -2,6 +2,8 @@ import _ from 'lodash'; import Base from './base.js'; export default _.extend({}, Base, { + type: 'regexp', + render(container) { this.container = container; this.contents = _.map(this.matches(), match => { diff --git a/src/js/parser/javascript/root.js b/src/js/parser/javascript/root.js index 960ec31..1fa1482 100644 --- a/src/js/parser/javascript/root.js +++ b/src/js/parser/javascript/root.js @@ -2,6 +2,8 @@ import _ from 'lodash'; import Base from './base.js'; export default _.extend({}, Base, { + type: 'root', + render(container) { this.contents = container.group();