compiler/PPCPluggableConfiguration.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 31 Jul 2015 07:57:23 +0100
changeset 512 694a247a12ba
parent 452 9f4558b3be66
child 529 439c4057517f
permissions -rw-r--r--
Added smoke tests for LRPParser

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