compiler/PPCStarAnyNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 15 Apr 2015 11:28:09 +0100
changeset 422 116d2b2af905
parent 421 7e08b31e0dae
child 438 20598d7ce9fa
permissions -rw-r--r--
To fold

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

"{ NameSpace: Smalltalk }"

PPCStarNode subclass:#PPCStarAnyNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Nodes'
!

!PPCStarAnyNode methodsFor:'as yet unclassified'!

compileWith: compiler effect: effect id: id
	compiler startMethod: id.
	compiler addVariable: 'retval size'.
	compiler add: 'size := context size - context position.'.
	compiler add: 'retval := Array new: size.'.
	compiler add: '(1 to: size) do: [ :e | retval at: e put: context next ].'.
	compiler add: '^ retval'.
 ^ compiler stopMethod.
!

prefix
	^ #starAny
!

rewrite: changeStatus
	"Nothing TODO"
! !