SmallSense__SmalltalkSyntaxHighlighter.st
branchcvs_MAIN
changeset 1016 2583025a1205
parent 1013 0d91497e2147
child 1063 4cb3da95f65f
equal deleted inserted replaced
1014:bae87be4512e 1016:2583025a1205
   601     "Modified: / 21-08-2011 / 09:26:30 / cg"
   601     "Modified: / 21-08-2011 / 09:26:30 / cg"
   602     "Modified: / 25-02-2014 / 14:07:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   602     "Modified: / 25-02-2014 / 14:07:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   603 !
   603 !
   604 
   604 
   605 rememberVariableElementFor:node from:pos1 to:pos2 assigned:assigned
   605 rememberVariableElementFor:node from:pos1 to:pos2 assigned:assigned
       
   606     "remember a variable element;
       
   607      chain it into a list of either block- or method variables.
       
   608      This is stupid: must use per-scope chains, as the current impl.
       
   609      often gives confusing output, if variables are redefined in inner scopes..."
       
   610      
   606     |name typeSymbol element prev|
   611     |name typeSymbol element prev|
   607 
   612 
   608     name := node name.
   613     name := node name.
   609     typeSymbol := node type.
   614     typeSymbol := node type.
       
   615 
   610     prev := (lastVariableElements at:typeSymbol ifAbsentPut:[Dictionary new]) at:name ifAbsent:[nil].
   616     prev := (lastVariableElements at:typeSymbol ifAbsentPut:[Dictionary new]) at:name ifAbsent:[nil].
   611     (prev notNil and:[prev start == pos1]) ifTrue:[
   617     (prev notNil and:[prev start == pos1]) ifTrue:[
   612 "/        prev assigned:assigned.
   618 "/        prev assigned:assigned.
   613         ^ self
   619         ^ self
   614     ].
   620     ].
   619     (lastVariableElements at:typeSymbol) at:name put:element.
   625     (lastVariableElements at:typeSymbol) at:name put:element.
   620 
   626 
   621     elements add: element.
   627     elements add: element.
   622 
   628 
   623     "Created: / 25-02-2014 / 12:13:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   629     "Created: / 25-02-2014 / 12:13:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   630     "Modified: / 10-02-2017 / 20:05:28 / cg"
   624 ! !
   631 ! !
   625 
   632 
   626 !SmalltalkSyntaxHighlighter class methodsFor:'documentation'!
   633 !SmalltalkSyntaxHighlighter class methodsFor:'documentation'!
   627 
   634 
   628 version_CVS
   635 version_CVS