|
|
@ -1,6 +1,4 @@
|
|
|
|
#lang br/quicklang
|
|
|
|
#lang br/quicklang
|
|
|
|
(provide (rename-out [b-module-begin #%module-begin])
|
|
|
|
|
|
|
|
(all-defined-out))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-exn-srcloc duplicate-line-number exn:fail)
|
|
|
|
(define-exn-srcloc duplicate-line-number exn:fail)
|
|
|
|
|
|
|
|
|
|
|
@ -11,6 +9,7 @@
|
|
|
|
(raise-duplicate-line-number
|
|
|
|
(raise-duplicate-line-number
|
|
|
|
($line-srcloc (check-duplicates lines = #:key $line-number))))
|
|
|
|
($line-srcloc (check-duplicates lines = #:key $line-number))))
|
|
|
|
(run lines)))
|
|
|
|
(run lines)))
|
|
|
|
|
|
|
|
(provide (rename-out [b-module-begin #%module-begin]))
|
|
|
|
|
|
|
|
|
|
|
|
(struct $line (number thunk srcloc) #:transparent)
|
|
|
|
(struct $line (number thunk srcloc) #:transparent)
|
|
|
|
|
|
|
|
|
|
|
@ -18,9 +17,7 @@
|
|
|
|
(with-pattern ([SRCLOC (syntax-srcloc caller-stx)])
|
|
|
|
(with-pattern ([SRCLOC (syntax-srcloc caller-stx)])
|
|
|
|
#'($line LINE-NUMBER (thunk STATEMENT) SRCLOC)))
|
|
|
|
#'($line LINE-NUMBER (thunk STATEMENT) SRCLOC)))
|
|
|
|
|
|
|
|
|
|
|
|
(define-macro (b-statement (PROC-NAME ARG ...))
|
|
|
|
(define (b-statement stmt) stmt)
|
|
|
|
#'(begin (PROC-NAME ARG ...)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (b-rem str) #f)
|
|
|
|
(define (b-rem str) #f)
|
|
|
|
(define (b-print str) (displayln str))
|
|
|
|
(define (b-print str) (displayln str))
|
|
|
|
(define (b-goto line-number) line-number)
|
|
|
|
(define (b-goto line-number) line-number)
|
|
|
@ -28,6 +25,8 @@
|
|
|
|
(define-exn end-program-signal exn:fail)
|
|
|
|
(define-exn end-program-signal exn:fail)
|
|
|
|
(define (b-end) (raise-end-program-signal))
|
|
|
|
(define (b-end) (raise-end-program-signal))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(provide b-line b-statement b-rem b-print b-goto b-end)
|
|
|
|
|
|
|
|
|
|
|
|
(define-exn-srcloc line-not-found exn:fail)
|
|
|
|
(define-exn-srcloc line-not-found exn:fail)
|
|
|
|
|
|
|
|
|
|
|
|
(define (run lines)
|
|
|
|
(define (run lines)
|
|
|
|