From 039bdf158b7e7be18161d0194231106cdff58f70 Mon Sep 17 00:00:00 2001 From: azu Date: Tue, 7 Jun 2016 20:08:04 +0900 Subject: [PATCH] chore(src): add comments --- src/morpheme-match.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/morpheme-match.js b/src/morpheme-match.js index 89f46b5..036daaf 100644 --- a/src/morpheme-match.js +++ b/src/morpheme-match.js @@ -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 @@ -46,4 +46,4 @@ module.exports = function createTokenMatcher(matchedTokens) { match: false }; } -} \ No newline at end of file +}; \ No newline at end of file