From dee8b924ea782cb8959dbadfb9c3c0d24b4d014a Mon Sep 17 00:00:00 2001 From: "G. Kay Lee" Date: Thu, 5 Jan 2017 01:21:30 +0800 Subject: [PATCH] Update the-super-tiny-compiler.js (#51) Made some modifications to make the newly-added text fit into existing paragraphs. --- the-super-tiny-compiler.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/the-super-tiny-compiler.js b/the-super-tiny-compiler.js index 0d62591..2bafccc 100755 --- a/the-super-tiny-compiler.js +++ b/the-super-tiny-compiler.js @@ -275,8 +275,8 @@ * CallExpression() {}, * }; * - * When we traverse our AST we will call the methods on this visitor whenever we - * encounter a node of a matching type. + * When we traverse our AST, we will call the methods on this visitor whenever we + * "enter" a node of a matching type. * * In order to make this useful we will also pass the node and a reference to * the parent node. @@ -286,10 +286,8 @@ * CallExpression(node, parent) {}, * }; * - * We call these functions when we "enter" the node. But there is also the - * possibilty of calling things on "exit". - * - * Imagine our tree structure from before in list form: + * However, there also exists the possibilty of calling things on "exit". Imagine + * our tree structure from before in list form: * * - Program * - CallExpression @@ -315,7 +313,7 @@ * <- CallExpression (exit) * <- Program (exit) * - * In order to supper that, our visitors will look like this: + * In order to support that, the final form of our visitor will look like this: * * var visitor = { * NumberLiteral: {