equal
deleted
inserted
replaced
221 !SmalltalkInferencer methodsFor:'private'! |
221 !SmalltalkInferencer methodsFor:'private'! |
222 |
222 |
223 infer |
223 infer |
224 Phase1 process:tree in:class manager:manager. |
224 Phase1 process:tree in:class manager:manager. |
225 Phase2 process:tree in:class manager:manager. |
225 Phase2 process:tree in:class manager:manager. |
|
226 Phase3 process:tree in:class manager:manager. |
226 |
227 |
227 " |
228 " |
228 (SmallSenseParseNodeInspector new node: tree source: source) open" |
229 (SmallSenseParseNodeInspector new node: tree source: source) open" |
229 |
230 |
230 "Created: / 26-11-2011 / 12:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
231 "Created: / 26-11-2011 / 12:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
231 "Modified: / 21-08-2015 / 15:45:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
232 "Modified: / 06-07-2017 / 16:21:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
232 ! |
233 ! |
233 |
234 |
234 parse |
235 parse |
235 |
236 |
236 parserClass isNil ifTrue:[ |
237 parserClass isNil ifTrue:[ |
708 [see also:] |
709 [see also:] |
709 |
710 |
710 " |
711 " |
711 ! ! |
712 ! ! |
712 |
713 |
|
714 !SmalltalkInferencer::Phase3 methodsFor:'visiting'! |
|
715 |
|
716 visitVariableNode:anObject |
|
717 | name className | |
|
718 |
|
719 name := anObject name. |
|
720 (name size > 1 and:[name first == $a]) ifTrue:[ |
|
721 (name second == $n and:[ name third isUppercase ]) ifTrue:[ |
|
722 className := (name copyFrom: 3) asSymbolIfInterned. |
|
723 ] ifFalse:[ name second isUppercase ifTrue:[ |
|
724 className := (name copyFrom: 2) asSymbolIfInterned. |
|
725 ]]. |
|
726 className notNil ifTrue:[ |
|
727 | cls | |
|
728 cls := Smalltalk at: className. |
|
729 cls notNil ifTrue:[ |
|
730 anObject inferedType type: (Type withClass: cls) type |
|
731 ]. |
|
732 ]. |
|
733 |
|
734 ]. |
|
735 |
|
736 "Created: / 06-07-2017 / 16:15:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
737 ! ! |
|
738 |
713 !SmalltalkInferencer class methodsFor:'documentation'! |
739 !SmalltalkInferencer class methodsFor:'documentation'! |
714 |
740 |
715 version_HG |
741 version_HG |
716 |
742 |
717 ^ '$Changeset: <not expanded> $' |
743 ^ '$Changeset: <not expanded> $' |