From 2f3b7787338cd585f1e999c37f8e68518ad743d8 Mon Sep 17 00:00:00 2001 From: Evgeny Orekhov Date: Fri, 15 Apr 2016 11:28:26 +0300 Subject: [PATCH] Simplify a while loop --- super-tiny-compiler.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/super-tiny-compiler.js b/super-tiny-compiler.js index 0cd203e..5234f1e 100644 --- a/super-tiny-compiler.js +++ b/super-tiny-compiler.js @@ -576,10 +576,7 @@ function parser(tokens) { // So we create a `while` loop that will continue until it encounters a // token with a `type` of `'paren'` and a `value` of a closing // parenthesis. - while ( - (token.type !== 'paren') || - (token.type === 'paren' && token.value !== ')') - ) { + while (token.type !== 'paren' || token.value !== ')') { // we'll call the `walk` function which will return a `node` and we'll // push it into our `node.params`. node.params.push(walk());