compiler/PPCLiteralNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 01 Jun 2015 22:02:17 +0100
changeset 477 b18b6cc7aabc
parent 452 9f4558b3be66
child 486 0dd7eb52b5a1
permissions -rw-r--r--
Codegen refactoring [1/x]: Introduced a PPCCodeBlock A PPCCodeBlock is an abstraction of a block of statements with temporaries. This will allow for scoped temporary management in code generator - temporary variables could be allocated for block only. (i.e., make them block-temporaries)

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

"{ NameSpace: Smalltalk }"

PPCAbstractLiteralNode subclass:#PPCLiteralNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Nodes'
!

!PPCLiteralNode methodsFor:'comparing'!

recognizedSentencesPrim
    ^ Array with: literal.
! !

!PPCLiteralNode methodsFor:'printing'!

printNameOn: aStream
    super printNameOn: aStream.
    aStream nextPutAll: ', '; print: literal
! !

!PPCLiteralNode methodsFor:'visiting'!

accept: visitor
    ^ visitor visitLiteralNode: self
! !