Permalink
Browse files

debugging mode: verify argument count

  • Loading branch information...
1 parent 5d4fc09 commit a6f9de2a6fd53e6984284b7c4cdb3a79abd0b931 @jlongster committed May 7, 2012
Showing with 7,239 additions and 1,784 deletions.
  1. +1,122 −270 ast.js
  2. +14 −7 ast.ol
  3. +1,311 −353 backends/js.js
  4. +38 −13 backends/js.ol
  5. +1,634 −367 compiler.js
  6. +7 −7 compiler.ol
  7. +1,165 −284 reader.js
  8. +1 −1 reader.ol
  9. +949 −230 runtime.js
  10. +11 −9 runtime.ol
  11. +980 −243 test.js
  12. +7 −0 tests/core.ol
View
1,392 ast.js
Oops, something went wrong.
View
@@ -6,18 +6,23 @@
(define unique-obj (list #f))
(define (make-node type data lineno colno)
- [unique-obj type data lineno colno])
+ [unique-obj type data #f lineno colno])
+
+(define (make-node-w/extra type data extra lineno colno)
+ [unique-obj type data extra lineno colno])
(define (copy-node node data)
- (make-node (node-type node)
- data
- (node-lineno node)
- (node-colno node)))
+ (make-node-w/extra (node-type node)
+ data
+ (node-extra node)
+ (node-lineno node)
+ (node-colno node)))
(define node-type (vec-getter 1))
(define node-data (vec-getter 2))
-(define node-lineno (vec-getter 3))
-(define node-colno (vec-getter 4))
+(define node-extra (vec-getter 3))
+(define node-lineno (vec-getter 4))
+(define node-colno (vec-getter 5))
(define (assert-node node)
(if (not (and (vector? node)
@@ -85,9 +90,11 @@
(node-data (car (node-data node))))
(set! module.exports {:make-node make-node
+ :make-node-w/extra make-node-w/extra
:copy-node copy-node
:node-type node-type
:node-data node-data
+ :node-extra node-extra
:node-lineno node-lineno
:node-colno node-colno
:type? is-type?
Oops, something went wrong.

0 comments on commit a6f9de2

Please sign in to comment.