# Copyright 2005-2007 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ pragma.syntax("0.9") pragma.enable("accumulator") def EventuallyDeepFrozen :()[DeepFrozen."eventually"()] := DeepFrozen."eventually"() def root :DeepFrozen := def makeAstroTag :DeepFrozen := def AstroTag :DeepFrozen := makeAstroTag.asType() def Pass :DeepFrozen := any # marker that the guarding is to be handled by another method def SourceSpan := .asType() def makeBaseAstroBuilder implements DeepFrozen, ExitViaHere { to run(self, schema, # :AstroSchema [=> BAstroArg := any, => BAstro := any]) { def baseAstroBuilder extends root[self] implements EventuallyDeepFrozen { # implements AstroBuilder method __optSealedDispatch(brand) :any { if (brand == EventuallyDeepFrozen.getPeekBrand()) { EventuallyDeepFrozen.getPeekSealer().seal(meta.getState()) } } to attr(functor :Pass, value :Pass) { return self.term(self.leafTag(schema.obtainTagForName(".attr."), null), self.term(functor, value)) } to bag(args :BAstroArg) { return self.term(self.leafTag(schema.obtainTagForName(".bag."), null), args) } #to composite(functor, data, optSpan :nullOk[SourceSpan]) { # # xxx ... #} to start(root :BAstro) { return root } to term(functor :Pass) { return self.term(functor, self.empty()) } to tuple(args :BAstroArg) { return self.term(self.leafTag(schema.obtainTagForName(".tuple."), null), args) } } return baseAstroBuilder } }