Skip to content

Commit b5c7100

Browse files
authored
Update README.md
Filled and replace argument names in ### Functions should only be one level of abstraction 308. fill code argument 350. fill tokens argument 361. replace ast into tokens
1 parent 03bcebd commit b5c7100

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function parseBetterJSAlternative(code) {
331331

332332
**Good**:
333333
```javascript
334-
function tokenize() {
334+
function tokenize(code) {
335335
let REGEXES = [
336336
// ...
337337
];
@@ -347,7 +347,7 @@ function tokenize() {
347347
return tokens;
348348
}
349349

350-
function lexer() {
350+
function lexer(tokens) {
351351
let ast;
352352
tokens.forEach((token) => {
353353
// lex...
@@ -358,7 +358,7 @@ function lexer() {
358358

359359
function parseBetterJSAlternative(code) {
360360
let tokens = tokenize(code);
361-
let ast = lexer(ast);
361+
let ast = lexer(tokens);
362362
ast.forEach((node) => {
363363
// parse...
364364
})

0 commit comments

Comments
 (0)