From 52135120c1dbac56520cda87c0c7d1c7a7f79406 Mon Sep 17 00:00:00 2001 From: TomFrost Date: Sun, 8 Mar 2015 23:44:18 -0400 Subject: [PATCH] Parser: Minor JSDoc corrections --- lib/parser/Parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/parser/Parser.js b/lib/parser/Parser.js index 48e8579..34437ad 100644 --- a/lib/parser/Parser.js +++ b/lib/parser/Parser.js @@ -21,8 +21,8 @@ var e = require('../Grammar').elements, * expression string thus far can be passed for a more user-friendly * error message. * @param {{}} [stopMap] A mapping of token types to any truthy value. When the - * token type is encountered with a zero balance, the parser will be - * automatically marked complete. + * token type is encountered, the parser will return the mapped value + * instead of boolean false. * @constructor */ function Parser(prefix, stopMap) { @@ -41,7 +41,7 @@ function Parser(prefix, stopMap) { * @throws {Error} if a token is added when the Parser has been marked as * complete by {@link #complete}, or if an unexpected token type is added. * @returns {boolean|*} the stopState value if this parser encountered a token - * in the stopState map with a truthy value; false if tokens can continue. + * in the stopState mapb; false if tokens can continue. */ Parser.prototype.addToken = function(token) { if (this._state == 'complete')