compiler/PPCGuard.st
changeset 396 ec569977267a
parent 392 9b297f0d949c
child 414 0eaf09920532
equal deleted inserted replaced
395:c6c712fc15b7 396:ec569977267a
    50 compileAny: compiler
    50 compileAny: compiler
    51 	compiler add: '(context atEnd not)'.
    51 	compiler add: '(context atEnd not)'.
    52 !
    52 !
    53 
    53 
    54 compileCharacter: compiler
    54 compileCharacter: compiler
    55 	self assert: (classification select: [ :e | e ]) size = 1.
    55         self assert: (classification select: [ :e | e ]) size = 1.
    56 	
    56         
    57 	classification keysAndValuesDo: [ :index :value | value ifTrue: [  
    57         classification keysAndValuesDo: [ :index :value | value ifTrue: [  
    58 		(index > 32 and: [ index < 127 ]) ifTrue: [ 
    58                 (index > 32 and: [ index < 127 ]) ifTrue: [ 
    59 			compiler add: '(context peek = ', (Character value: index) printString, ')'
    59                         compiler add: '(context peek = ', (Character value: index) storeString, ')'
    60 		] ifFalse: [ 
    60                 ] ifFalse: [ 
    61 			id := compiler idFor: (Character value: index) prefixed: #character.
    61                         id := compiler idFor: (Character value: index) prefixed: #character.
    62 			compiler addConstant: (Character value: index) as: id.
    62                         compiler addConstant: (Character value: index) as: id.
    63 			compiler add: '(context peek = ', id, ')'.
    63                         compiler add: '(context peek = ', id, ')'.
    64 	 	] 
    64                 ] 
    65 	] ].
    65         ] ].
    66 
    66 
       
    67     "Modified: / 26-10-2014 / 22:13:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    67 !
    68 !
    68 
    69 
    69 compileGuard: compiler id: symbol
    70 compileGuard: compiler id: symbol
    70 	self id: symbol.
    71 	self id: symbol.
    71 	^ self compileGuard: compiler
    72 	^ self compileGuard: compiler