author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 05 Nov 2014 21:40:01 +0000 | |
changeset 413 | 5389e6fbb3bc |
parent 392 | 9b297f0d949c |
child 414 | 0eaf09920532 |
permissions | -rw-r--r-- |
391
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'stx:goodies/petitparser/compiler' }" |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
PPCAbstractActionNode subclass:#PPCSymbolActionNode |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
instanceVariableNames:'' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
classVariableNames:'' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
poolDictionaries:'' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
category:'PetitCompiler-Nodes' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
|
413
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
10 |
|
391
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
!PPCSymbolActionNode methodsFor:'as yet unclassified'! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
compileWith: compiler effect: effect id: id |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
compiler startMethod: id. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
compiler addVariable: 'element'. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
compiler add: 'element := '. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
compiler callOnLine: (child compileWith: compiler). |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
compiler add: 'error ifFalse: [ ^ element ', block asString, ' ].'. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
compiler add: '^ failure'. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
^ compiler stopMethod. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
! ! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
|
413
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
23 |
!PPCSymbolActionNode class methodsFor:'documentation'! |
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
24 |
|
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
25 |
version_HG |
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
26 |
|
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
27 |
^ '$Changeset: <not expanded> $' |
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
28 |
! ! |
5389e6fbb3bc
Classes renamed to ease following merge wirh Pharo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
29 |