compiler/PPCPluggableConfiguration.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 21 May 2015 14:35:34 +0100
changeset 465 f729f6cd3c76
parent 452 9f4558b3be66
child 529 439c4057517f
permissions -rw-r--r--
Merge

"{ Package: 'stx:goodies/petitparser/compiler' }"

"{ NameSpace: Smalltalk }"

Object subclass:#PPCPluggableConfiguration
	instanceVariableNames:'block base'
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Core'
!

!PPCPluggableConfiguration class methodsFor:'as yet unclassified'!

on: aBlock
    ^ self on: aBlock base: PPCConfiguration default
!

on: aBlock base: aPPCCOnfiguration
    ^ self new
        block: aBlock;
        base: aPPCCOnfiguration;
        yourself
! !

!PPCPluggableConfiguration methodsFor:'as yet unclassified'!

arguments: args
    ^ base arguments: args
!

base: aPPCConfiguration
    base := aPPCConfiguration
!

block: aBlock
    block := aBlock
!

compile: whatever
    base input: whatever.
    block value: base.
    ^ base ir
!

input: whatever
    ^ base input: whatever
!

invokePhases
    ^ block value: base
! !