瀏覽代碼

LOL I forgot how Lisp works

master
Dylan Baker 5 年之前
父節點
當前提交
c833db2f94
共有 2 個檔案被更改,包括 0 行新增11 行删除
  1. 0
    7
      src/lexer.js
  2. 0
    4
      src/parser.js

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

@@ -44,13 +44,6 @@ module.exports = class Lexer {
44 44
           value: value,
45 45
         })
46 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 47
       } else if (source[pos].match(/\d/)) {
55 48
         let number = ''
56 49
         while (source[pos] && source[pos].match(/\d/)) {

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

@@ -95,10 +95,6 @@ module.exports = class Parser {
95 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 100
     this.tokenStream.eat(tokenTypes.CPAREN)

Loading…
取消
儲存