You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/restructure/base.rkt

19 lines
630 B
Racket

7 years ago
#lang racket/base
(require racket/class sugar/debug)
7 years ago
(provide (all-defined-out))
(define RestructureBase
(class object%
(super-new)
(field [starting-offset #f]
[parent #f])
(define/pubment (decode stream . args)
(set! starting-offset (and (object? stream) (send stream pos)))
(set! parent (and (pair? args) (is-a? (car args) RestructureBase) (car args)))
(inner (void) decode stream . args))
7 years ago
(abstract encode)
(abstract size)
(define/public (process . args) (void))
(define/public (preEncode . args) (void))))
(define (RestructureBase? x) (is-a? x RestructureBase))