Browse Source

Somehow I wasn't initializing variables?

master
Dylan Baker 6 years ago
parent
commit
22512cf334
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/lexer.js

+ 3
- 3
src/lexer.js View File

@@ -9,9 +9,9 @@ const tokenTypes = {
9 9
 }
10 10
 
11 11
 const scan = source => {
12
-  pos = 0
13
-  line = 1
14
-  tokens = []
12
+  let pos = 0
13
+  let line = 1
14
+  let tokens = []
15 15
 
16 16
   while (pos < source.length) {
17 17
     if (source[pos].match(/\(/)) {

Loading…
Cancel
Save