compiler/PPCCompiler.st
changeset 476 c45383095de4
parent 474 62b5330d8b23
child 477 b18b6cc7aabc
equal deleted inserted replaced
475:d47fac0db40b 476:c45383095de4
   117     currentMethod add: '"', string, '"'.
   117     currentMethod add: '"', string, '"'.
   118 !
   118 !
   119 
   119 
   120 addConstant: value as: name    
   120 addConstant: value as: name    
   121     (constants includesKey: name) ifTrue:[ 
   121     (constants includesKey: name) ifTrue:[ 
   122         (constants at: name) ~~ value ifTrue:[ 
   122         (constants at: name) ~= value ifTrue:[ 
   123             self error:'Duplicate constant!!'.
   123             self error:'Duplicate constant!!'.
   124         ].
   124         ].
   125         ^ self.
   125         ^ self.
   126     ].
   126     ].
   127     constants at: name put: value
   127     constants at: name put: value
   128 
   128 
   129     "Modified: / 26-05-2015 / 17:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   129     "Modified: / 29-05-2015 / 07:22:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   130 !
   130 !
   131 
   131 
   132 addOnLine: string
   132 addOnLine: string
   133     currentMethod addOnLine: string.
   133     currentMethod addOnLine: string.
   134 !
   134 !