瀏覽代碼

LOL I forgot how Lisp works

master
Dylan Baker 7 年之前
父節點
當前提交
c833db2f94
共有 2 個文件被更改,包括 0 次插入11 次删除
  1. 0
    7
      src/lexer.js
  2. 0
    4
      src/parser.js

+ 0
- 7
src/lexer.js 查看文件

44
           value: value,
44
           value: value,
45
         })
45
         })
46
         pos += value.length + 1 // the +1 is to account for the apostrophe
46
         pos += value.length + 1 // the +1 is to account for the apostrophe
47
-      } else if (source[pos].match(/\,/)) {
48
-        tokenStream.tokens.push({
49
-          type: tokenTypes.COMMA,
50
-          line: line,
51
-          value: value,
52
-        })
53
-        pos += 1
54
       } else if (source[pos].match(/\d/)) {
47
       } else if (source[pos].match(/\d/)) {
55
         let number = ''
48
         let number = ''
56
         while (source[pos] && source[pos].match(/\d/)) {
49
         while (source[pos] && source[pos].match(/\d/)) {

+ 0
- 4
src/parser.js 查看文件

95
           name: this.tokenStream.eat(tokenTypes.IDENTIFIER).value,
95
           name: this.tokenStream.eat(tokenTypes.IDENTIFIER).value,
96
         }),
96
         }),
97
       )
97
       )
98
-
99
-      if (this.tokenStream.peek().type === tokenTypes.COMMA) {
100
-        this.tokenStream.eat(tokenTypes.COMMA)
101
-      }
102
     }
98
     }
103
 
99
 
104
     this.tokenStream.eat(tokenTypes.CPAREN)
100
     this.tokenStream.eat(tokenTypes.CPAREN)

Loading…
取消
儲存