File tree
Expand file treeCollapse file tree1 file changed
+3
-3
lines changed Expand file treeCollapse file tree1 file changed
+3
-3
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -331,7 +331,7 @@ function parseBetterJSAlternative(code) {
|
331 | 331 |
|
332 | 332 | **Good**:
|
333 | 333 | ```javascript
|
334 |
| -function tokenize() { |
| 334 | +function tokenize(code) { |
335 | 335 | let REGEXES = [
|
336 | 336 | // ...
|
337 | 337 | ];
|
@@ -347,7 +347,7 @@ function tokenize() {
|
347 | 347 | return tokens;
|
348 | 348 | }
|
349 | 349 |
|
350 |
| -function lexer() { |
| 350 | +function lexer(tokens) { |
351 | 351 | let ast;
|
352 | 352 | tokens.forEach((token) => {
|
353 | 353 | // lex...
|
@@ -358,7 +358,7 @@ function lexer() {
|
358 | 358 |
|
359 | 359 | function parseBetterJSAlternative(code) {
|
360 | 360 | let tokens = tokenize(code);
|
361 |
| -let ast = lexer(ast); |
| 361 | +let ast = lexer(tokens); |
362 | 362 | ast.forEach((node) => {
|
363 | 363 | // parse...
|
364 | 364 | })
|
|
You can’t perform that action at this time.
0 commit comments