Skip to content

Commit a4b38d7

Browse files
Minor typo fixes
1 parent 386d1ef commit a4b38d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

the-super-tiny-compiler.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
* 1. *Parsing* is taking raw code and turning it into a more abstract
108108
* representation of the code.
109109
*
110-
* 2. *Transformation* takes this abstract representation and manipulates to do
111-
* whatever the compiler wants it to.
110+
* 2. *Transformation* takes this abstract representation and manipulates it to
111+
* do whatever the compiler wants it to.
112112
*
113113
* 3. *Code Generation* takes the transformed representation of the code and
114114
* turns it into new code.
@@ -333,7 +333,7 @@
333333
*
334334
* Code generators work several different ways, some compilers will reuse the
335335
* tokens from earlier, others will have created a separate representation of
336-
* the code so that they can print node linearly, but from what I can tell most
336+
* the code so that they can print nodes linearly, but from what I can tell most
337337
* will use the same AST we just created, which is what we’re going to focus on.
338338
*
339339
* Effectively our code generator will know how to “print” all of the different
@@ -629,7 +629,7 @@ function parser(tokens) {
629629
// (add 2 (subtract 4 2))
630630
//
631631
// You'll also notice that in our tokens array we have multiple closing
632-
// parenthesis.
632+
// parentheses.
633633
//
634634
// [
635635
// { type: 'paren', value: '(' },
@@ -850,8 +850,8 @@ function transformer(ast) {
850850
};
851851

852852
// Next I'm going to cheat a little and create a bit of a hack. We're going to
853-
// use a property named `context` on our parent nodes that we're going to push
854-
// nodes to their parent's `context`. Normally you would have a better
853+
// use a property named `context` on our parent nodes that we're going to use
854+
// to push nodes to their parent's `context`. Normally you would have a better
855855
// abstraction than this, but for our purposes this keeps things simple.
856856
//
857857
// Just take note that the context is a reference *from* the old ast *to* the

0 commit comments

Comments
 (0)