compiler/tests/extras/PPCLRPErrorNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 31 Jul 2015 09:35:15 +0100
changeset 513 7b8093caf796
parent 512 694a247a12ba
child 529 439c4057517f
permissions -rw-r--r--
Portability fix: do not use "/ style comments in PetitParser code.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
512
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/petitparser/compiler/tests/extras' }"
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: Smalltalk }"
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
PPCLRPContainedElement subclass:#PPCLRPErrorNode
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:'block interpretedBlock'
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'PetitCompiler-Extras-Tests-LRP'
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
!PPCLRPErrorNode methodsFor:'error handing'!
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
onErrorNode: aBlock parser: aLRPParser
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
    aLRPParser failWithValue: (aBlock value: self)
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
! !
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
!PPCLRPErrorNode methodsFor:'testing'!
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
isError
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
    ^true
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
! !
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
!PPCLRPErrorNode methodsFor:'visiting'!
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
acceptVisitor: aLRPNodeVisitor
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
    aLRPNodeVisitor visitErrorNode: self.
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
! !
694a247a12ba Added smoke tests for LRPParser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30