Skip to content

Commit

Permalink
chore(src): add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jun 7, 2016
1 parent 76b6d67 commit 039bdf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/morpheme-match.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ module.exports = function createTokenMatcher(matchedTokens) {
matchTokens.push(token);
currentTokenPosition += 1;
} else {
// restart
// reset position
matchTokens.length = 0;
currentTokenPosition = 0;
}
// match
// match all tokens
if (currentTokenPosition === tokenCount) {
const tokens = matchTokens.slice();
// match -> reset
Expand All @@ -46,4 +46,4 @@ module.exports = function createTokenMatcher(matchedTokens) {
match: false
};
}
}
};

0 comments on commit 039bdf1

Please sign in to comment.