1048 Used to highlight Java class references." |
1057 Used to highlight Java class references." |
1049 |
1058 |
1050 ^ (type == #GlobalVariable) and:[name = 'JAVA'] |
1059 ^ (type == #GlobalVariable) and:[name = 'JAVA'] |
1051 |
1060 |
1052 "Created: / 19-04-2012 / 09:38:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1061 "Created: / 19-04-2012 / 09:38:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1053 ! |
|
1054 |
|
1055 isLocal |
|
1056 "return true, if this is a node for a local (block or method) variable" |
|
1057 |
|
1058 ^ self isLocalVariable |
|
1059 ! |
|
1060 |
|
1061 isLocalVariable |
|
1062 "return true, if this is a node for a local (block or method) variable" |
|
1063 |
|
1064 ^ (type == #MethodVariable) or:[type == #BlockVariable] |
|
1065 ! |
|
1066 |
|
1067 isMethodArg |
|
1068 ^ type == #MethodArg |
|
1069 ! |
|
1070 |
|
1071 isMethodVariable |
|
1072 ^ type == #MethodVariable |
|
1073 ! |
|
1074 |
|
1075 isPoolVariable |
|
1076 ^ type == #PoolVariable |
|
1077 ! |
|
1078 |
|
1079 isUndeclared |
|
1080 |sym| |
|
1081 |
|
1082 type == #PrivateClass ifTrue:[ |
|
1083 sym := (value name , '::' , name) asSymbolIfInterned. |
|
1084 ^ sym isNil or:[(Smalltalk includesKey:sym) not]. |
|
1085 ]. |
|
1086 type == #GlobalVariable ifTrue:[ |
|
1087 sym := name asSymbolIfInterned. |
|
1088 ^ sym isNil or:[(Smalltalk includesKey:sym) not] |
|
1089 ]. |
|
1090 ^ false |
|
1091 |
|
1092 "Modified: / 05-09-2013 / 02:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1093 ! |
|
1094 |
|
1095 isVariable |
|
1096 "return true, if this is a node for a variable" |
|
1097 |
|
1098 ^ true |
|
1099 |
|
1100 "Created: 14.4.1996 / 00:46:32 / cg" |
|
1101 ! ! |
|
1102 |
|
1103 !VariableNode methodsFor:'testing'! |
|
1104 |
|
1105 isInstance |
|
1106 <resource: #obsolete> |
|
1107 |
|
1108 self obsoleteMethodWarning. |
|
1109 ^ self isInstanceVariable |
|
1110 ! |
1062 ! |
1111 |
1063 |
1112 isJavaPackageReference |
1064 isJavaPackageReference |
1113 "Return true, given node is JAVA package reference in form: |
1065 "Return true, given node is JAVA package reference in form: |
1114 JAVA package1 package2 |
1066 JAVA package1 package2 |
1115 " |
1067 " |
1116 |
1068 |
1117 ^self isJAVA |
1069 ^self isJAVA |
1118 |
1070 |
1119 "Created: / 19-04-2012 / 09:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1071 "Created: / 19-04-2012 / 09:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1072 ! |
|
1073 |
|
1074 isLocal |
|
1075 "return true, if this is a node for a local (block or method) variable" |
|
1076 |
|
1077 ^ self isLocalVariable |
|
1078 ! |
|
1079 |
|
1080 isLocalVariable |
|
1081 "return true, if this is a node for a local (block or method) variable" |
|
1082 |
|
1083 ^ (type == #MethodVariable) or:[type == #BlockVariable] |
|
1084 ! |
|
1085 |
|
1086 isMethodArg |
|
1087 ^ type == #MethodArg |
|
1088 ! |
|
1089 |
|
1090 isMethodVariable |
|
1091 ^ type == #MethodVariable |
|
1092 ! |
|
1093 |
|
1094 isPoolVariable |
|
1095 ^ type == #PoolVariable |
|
1096 ! |
|
1097 |
|
1098 isUndeclared |
|
1099 |sym| |
|
1100 |
|
1101 type == #PrivateClass ifTrue:[ |
|
1102 sym := (value name , '::' , name) asSymbolIfInterned. |
|
1103 ^ sym isNil or:[(Smalltalk includesKey:sym) not]. |
|
1104 ]. |
|
1105 type == #GlobalVariable ifTrue:[ |
|
1106 sym := name asSymbolIfInterned. |
|
1107 ^ sym isNil or:[(Smalltalk includesKey:sym) not] |
|
1108 ]. |
|
1109 ^ false |
|
1110 |
|
1111 "Modified: / 05-09-2013 / 02:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1112 ! |
|
1113 |
|
1114 isVariable |
|
1115 "return true, if this is a node for a variable" |
|
1116 |
|
1117 ^ true |
|
1118 |
|
1119 "Created: 14.4.1996 / 00:46:32 / cg" |
1120 ! ! |
1120 ! ! |
1121 |
1121 |
1122 !VariableNode methodsFor:'visiting'! |
1122 !VariableNode methodsFor:'visiting'! |
1123 |
1123 |
1124 acceptVisitor:aVisitor |
1124 acceptVisitor:aVisitor |