parsers/java/PJBooleanLiteralNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 31 Jul 2015 08:16:54 +0100
changeset 508 c74a0dbfa161
parent 435 3bc08fb90133
permissions -rw-r--r--
Temporarily disabled #acceptsEpsilon test in PPCTokenizingCodeGenerator>>visitChoiceNode: JK should have a look and come up with proper solution.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
435
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/petitparser/parsers/java' }"
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: Smalltalk }"
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
PJExpressionNode subclass:#PJBooleanLiteralNode
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:'booleanValue'
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'PetitJava-AST'
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
PJBooleanLiteralNode comment:'Node representing a boolean literal'
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
!
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
!PJBooleanLiteralNode class methodsFor:'instance creation'!
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
booleanValue: aBoolean
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
	^(self new) booleanValue: aBoolean
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
! !
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
!PJBooleanLiteralNode methodsFor:'accessing'!
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
booleanValue
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	^ booleanValue
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
!
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
booleanValue: anObject
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
	booleanValue := anObject
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
! !
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
!PJBooleanLiteralNode methodsFor:'visiting'!
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
acceptVisitor: aVisitor
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
	^ aVisitor visitBooleanLiteralNode: self
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
! !
3bc08fb90133 Initial commit of PetitJava
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38