upgrade to #lang scheme
svn: r15345
This commit is contained in:
parent
3d356123cf
commit
b55944bb93
|
@ -1,4 +1,4 @@
|
||||||
(module contexts mzscheme
|
#lang scheme
|
||||||
|
|
||||||
(define-struct block-context (return?))
|
(define-struct block-context (return?))
|
||||||
(define-struct (top-block-context block-context) ())
|
(define-struct (top-block-context block-context) ())
|
||||||
|
@ -76,4 +76,4 @@
|
||||||
the-type-or-expression-context
|
the-type-or-expression-context
|
||||||
the-prototype-context
|
the-prototype-context
|
||||||
|
|
||||||
context->name))
|
context->name)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
#lang scheme
|
||||||
|
|
||||||
(module ops mzscheme
|
|
||||||
(provide unary-prefix-ops
|
(provide unary-prefix-ops
|
||||||
unary-postfix-ops
|
unary-postfix-ops
|
||||||
(struct op (id))
|
(struct-out op)
|
||||||
(struct prefix ())
|
(struct-out prefix)
|
||||||
(struct cast-prefix (type))
|
(struct-out cast-prefix)
|
||||||
(struct infix ())
|
(struct-out infix)
|
||||||
(struct postfix ())
|
(struct-out postfix)
|
||||||
prec-key
|
prec-key
|
||||||
precedence-table
|
precedence-table
|
||||||
op-table)
|
op-table)
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
[(postfix? op) 'post])
|
[(postfix? op) 'post])
|
||||||
(syntax-e (op-id op)))))
|
(syntax-e (op-id op)))))
|
||||||
|
|
||||||
(define precedence-table (make-immutable-hash-table
|
(define precedence-table (make-immutable-hash
|
||||||
'(((in . |.|) . 100)
|
'(((in . |.|) . 100)
|
||||||
((in . #%parens) . 100)
|
((in . #%parens) . 100)
|
||||||
((in . #%brackets) . 100)
|
((in . #%brackets) . 100)
|
||||||
|
@ -82,10 +82,10 @@
|
||||||
((in . >>>=) . 10)
|
((in . >>>=) . 10)
|
||||||
((in . \,) . 6)
|
((in . \,) . 6)
|
||||||
((in . :) . 5)
|
((in . :) . 5)
|
||||||
((in . ?) . 4))
|
((in . ?) . 4))))
|
||||||
'equal))
|
|
||||||
|
|
||||||
(define op-table (make-hash-table))
|
|
||||||
(hash-table-for-each precedence-table (lambda (k v)
|
(define op-table (make-hash))
|
||||||
(hash-table-put! op-table (cdr k) #t))))
|
(hash-for-each precedence-table (lambda (k v)
|
||||||
|
(hash-set! op-table (cdr k) #t)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user