Skip to content

Commit

Permalink
remove unnecessary exports
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed May 2, 2018
1 parent a446ca4 commit 60c2c60
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 29 deletions.
27 changes: 14 additions & 13 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@
}
};

var expressionRE = /"[^"]*"|'[^']*'|\d+[a-zA-Z$_]\w*|\.[a-zA-Z$_]\w*|[a-zA-Z$_]\w*:|([a-zA-Z$_]\w*)/g;
var escapeRE = /(?:(?:&(?:amp|gt|lt|nbsp|quot);)|"|\\|\n)/g;
var escapeMap = {
"&": '&',
">": '>',
"&lt;": '<',
"&nbsp;": ' ',
"&quot;": "\\\"",
'\\': "\\\\",
'"': "\\\"",
'\n': "\\n"
};

var pushChild = function (child, stack) {
stack[stack.length - 1].children.push(child);
};
Expand Down Expand Up @@ -116,6 +103,18 @@
return index;
};

var escapeRE = /(?:(?:&(?:amp|gt|lt|nbsp|quot);)|"|\\|\n)/g;
var escapeMap = {
"&amp;": '&',
"&gt;": '>',
"&lt;": '<',
"&nbsp;": ' ',
"&quot;": "\\\"",
'\\': "\\\\",
'"': "\\\"",
'\n': "\\n"
};

var parseText = function (index, input, length, stack) {
var content = "";

Expand All @@ -138,6 +137,8 @@
return index;
};

var expressionRE = /"[^"]*"|'[^']*'|\d+[a-zA-Z$_]\w*|\.[a-zA-Z$_]\w*|[a-zA-Z$_]\w*:|([a-zA-Z$_]\w*)/g;

var parseExpression = function (index, input, length, stack, dependencies, locals) {
var expression = "";

Expand Down
2 changes: 1 addition & 1 deletion dist/moon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/compiler/parser/expression.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { expressionRE, pushChild } from "./util";
import { pushChild } from "./util";

const expressionRE = /"[^"]*"|'[^']*'|\d+[a-zA-Z$_]\w*|\.[a-zA-Z$_]\w*|[a-zA-Z$_]\w*:|([a-zA-Z$_]\w*)/g;

export const parseExpression = (index, input, length, stack, dependencies, locals) => {
let expression = "";
Expand Down
14 changes: 13 additions & 1 deletion src/compiler/parser/text.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
import { escapeRE, escapeMap, pushChild } from "./util";
import { pushChild } from "./util";

const escapeRE = /(?:(?:&(?:amp|gt|lt|nbsp|quot);)|"|\\|\n)/g;
const escapeMap = {
"&amp;": '&',
"&gt;": '>',
"&lt;": '<',
"&nbsp;": ' ',
"&quot;": "\\\"",
'\\': "\\\\",
'"': "\\\"",
'\n': "\\n"
};

export const parseText = (index, input, length, stack) => {
let content = "";
Expand Down
13 changes: 0 additions & 13 deletions src/compiler/parser/util.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
export { error } from "../../util/util";

export const expressionRE = /"[^"]*"|'[^']*'|\d+[a-zA-Z$_]\w*|\.[a-zA-Z$_]\w*|[a-zA-Z$_]\w*:|([a-zA-Z$_]\w*)/g;
export const escapeRE = /(?:(?:&(?:amp|gt|lt|nbsp|quot);)|"|\\|\n)/g;
export const escapeMap = {
"&amp;": '&',
"&gt;": '>',
"&lt;": '<',
"&nbsp;": ' ',
"&quot;": "\\\"",
'\\': "\\\\",
'"': "\\\"",
'\n': "\\n"
};

export const pushChild = (child, stack) => {
stack[stack.length - 1].children.push(child);
};

0 comments on commit 60c2c60

Please sign in to comment.