Skip to content

Commit

Permalink
change name of parse tree walker
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed May 6, 2017
1 parent c8224d8 commit b692c13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@
};

while (state.current < tokens.length) {
var child = walk(state);
var child = parseWalk(state);
if (child) {
root.children.push(child);
}
Expand All @@ -1293,7 +1293,7 @@
};
};

var walk = function (state) {
var parseWalk = function (state) {
var token = state.tokens[state.current];
var previousToken = state.tokens[state.current - 1];
var nextToken = state.tokens[state.current + 1];
Expand Down Expand Up @@ -1346,7 +1346,7 @@
// Match all children
var current = state.current;
while (token.type !== "tag" || token.type === "tag" && (token.closeStart === undefined && token.closeEnd === undefined || token.value !== tagType)) {
var parsedChildState = walk(state);
var parsedChildState = parseWalk(state);
if (parsedChildState !== null) {
node.children.push(parsedChildState);
}
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const parse = function(tokens) {
}

while(state.current < tokens.length) {
const child = walk(state);
const child = parseWalk(state);
if(child) {
root.children.push(child);
}
Expand All @@ -30,7 +30,7 @@ const createParseNode = function(type, props, children) {
}
}

const walk = function(state) {
const parseWalk = function(state) {
let token = state.tokens[state.current];
let previousToken = state.tokens[state.current - 1];
let nextToken = state.tokens[state.current + 1];
Expand Down Expand Up @@ -83,7 +83,7 @@ const walk = function(state) {
// Match all children
const current = state.current;
while((token.type !== "tag") || ((token.type === "tag") && ((token.closeStart === undefined && token.closeEnd === undefined) || (token.value !== tagType)))) {
const parsedChildState = walk(state);
const parsedChildState = parseWalk(state);
if(parsedChildState !== null) {
node.children.push(parsedChildState);
}
Expand Down

0 comments on commit b692c13

Please sign in to comment.