author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 30 Apr 2015 23:43:14 +0200 | |
changeset 438 | 20598d7ce9fa |
parent 422 | 116d2b2af905 |
child 452 | 9f4558b3be66 |
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/tests' }" |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
422 | 3 |
"{ NameSpace: Smalltalk }" |
4 |
||
391
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
Object subclass:#PPCMockCompiler |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
instanceVariableNames:'lines' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
classVariableNames:'' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
poolDictionaries:'' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
category:'PetitCompiler-Tests-Core' |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
|
393
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
12 |
|
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
13 |
!PPCMockCompiler class methodsFor:'instance creation'! |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
14 |
|
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
15 |
new |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
16 |
"return an initialized instance" |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
17 |
|
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
18 |
^ self basicNew initialize. |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
19 |
! ! |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
20 |
|
391
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
!PPCMockCompiler methodsFor:'accessing'! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
lines |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
^ lines |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
lines: anObject |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
lines := anObject |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
! ! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
!PPCMockCompiler methodsFor:'as yet unclassified'! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
add: string |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
lines add: string |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
addConstant: object as: id |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
"TODO" |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
422
diff
changeset
|
41 |
! ! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
422
diff
changeset
|
42 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
422
diff
changeset
|
43 |
!PPCMockCompiler methodsFor:'initialization'! |
391
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
44 |
|
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
45 |
initialize |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
46 |
super initialize. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
lines := OrderedCollection new. |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
48 |
! ! |
553a5456963b
Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
|
393
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
50 |
!PPCMockCompiler class methodsFor:'documentation'! |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
51 |
|
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
52 |
version_HG |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
53 |
|
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
54 |
^ '$Changeset: <not expanded> $' |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
55 |
! ! |
00381102a9b5
Override #new in classes that implement #initialize.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
392
diff
changeset
|
56 |