compiler/PPCPluggableConfiguration.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 24 Aug 2015 17:38:44 +0100
changeset 527 9b50ec9a6918
parent 452 9f4558b3be66
child 529 439c4057517f
permissions -rw-r--r--
Added missing #new methods

"{ 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
! !