50 compileAny: compiler |
54 compileAny: compiler |
51 compiler add: '(context atEnd not)'. |
55 compiler add: '(context atEnd not)'. |
52 ! |
56 ! |
53 |
57 |
54 compileCharacter: compiler |
58 compileCharacter: compiler |
55 self assert: (classification select: [ :e | e ]) size = 1. |
59 self assert: (classification select: [ :e | e ]) size = 1. |
56 |
60 |
57 classification keysAndValuesDo: [ :index :value | value ifTrue: [ |
61 classification keysAndValuesDo: [ :index :value | value ifTrue: [ |
58 (index > 32 and: [ index < 127 ]) ifTrue: [ |
62 (index > 32 and: [ index < 127 ]) ifTrue: [ |
59 compiler add: '(context peek = ', (Character value: index) storeString, ')' |
63 compiler add: '(context peek = ', (Character value: index) storeString, ')' |
60 ] ifFalse: [ |
64 ] ifFalse: [ |
61 id := compiler idFor: (Character value: index) prefixed: #character. |
65 id := compiler idFor: (Character value: index) prefixed: #character. |
62 compiler addConstant: (Character value: index) as: id. |
66 compiler addConstant: (Character value: index) as: id. |
63 compiler add: '(context peek = ', id, ')'. |
67 compiler add: '(context peek = ', id, ')'. |
64 ] |
68 ] |
65 ] ]. |
69 ] ]. |
66 |
70 |
67 "Modified: / 26-10-2014 / 22:13:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
68 ! |
71 ! |
69 |
72 |
70 compileGuard: compiler id: symbol |
73 compileGuard: compiler id: symbol |
71 self id: symbol. |
74 self id: symbol. |
72 ^ self compileGuard: compiler |
75 ^ self compileGuard: compiler |