Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
6a03ec38
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6a03ec38
编写于
5月 27, 2011
作者:
A
Andrey Breslav
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tests fixed
+ 'this' is resolved to the corresponding declaration
上级
e4df21c1
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
211 addition
and
58 deletion
+211
-58
idea/src/org/jetbrains/jet/codegen/JetTypeMapper.java
idea/src/org/jetbrains/jet/codegen/JetTypeMapper.java
+2
-1
idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
.../org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
+3
-0
idea/src/org/jetbrains/jet/lang/psi/JetSimpleNameExpression.java
...c/org/jetbrains/jet/lang/psi/JetSimpleNameExpression.java
+1
-1
idea/src/org/jetbrains/jet/lang/psi/JetThisExpression.java
idea/src/org/jetbrains/jet/lang/psi/JetThisExpression.java
+5
-0
idea/src/org/jetbrains/jet/lang/resolve/AbstractScopeAdapter.java
.../org/jetbrains/jet/lang/resolve/AbstractScopeAdapter.java
+4
-0
idea/src/org/jetbrains/jet/lang/resolve/ChainedScope.java
idea/src/org/jetbrains/jet/lang/resolve/ChainedScope.java
+15
-0
idea/src/org/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java
...g/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java
+0
-1
idea/src/org/jetbrains/jet/lang/resolve/DescriptorUtils.java
idea/src/org/jetbrains/jet/lang/resolve/DescriptorUtils.java
+33
-0
idea/src/org/jetbrains/jet/lang/resolve/JetScope.java
idea/src/org/jetbrains/jet/lang/resolve/JetScope.java
+3
-0
idea/src/org/jetbrains/jet/lang/resolve/JetScopeImpl.java
idea/src/org/jetbrains/jet/lang/resolve/JetScopeImpl.java
+5
-0
idea/src/org/jetbrains/jet/lang/resolve/SubstitutingScope.java
...src/org/jetbrains/jet/lang/resolve/SubstitutingScope.java
+7
-0
idea/src/org/jetbrains/jet/lang/resolve/WritableScopeImpl.java
...src/org/jetbrains/jet/lang/resolve/WritableScopeImpl.java
+8
-0
idea/src/org/jetbrains/jet/lang/resolve/java/JavaClassMembersScope.java
...etbrains/jet/lang/resolve/java/JavaClassMembersScope.java
+5
-0
idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java
idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java
+5
-0
idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java
idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java
+17
-8
idea/testData/psi/AnnotatedExpressions.txt
idea/testData/psi/AnnotatedExpressions.txt
+2
-1
idea/testData/psi/Labels.txt
idea/testData/psi/Labels.txt
+16
-8
idea/testData/psi/Properties.txt
idea/testData/psi/Properties.txt
+2
-1
idea/testData/psi/SimpleExpressions.txt
idea/testData/psi/SimpleExpressions.txt
+4
-2
idea/testData/psi/examples/BinaryTree.txt
idea/testData/psi/examples/BinaryTree.txt
+10
-5
idea/testData/psi/examples/BitArith.txt
idea/testData/psi/examples/BitArith.txt
+2
-1
idea/testData/psi/examples/PolymorphicClassObjects.txt
idea/testData/psi/examples/PolymorphicClassObjects.txt
+2
-1
idea/testData/psi/examples/UnionFind.txt
idea/testData/psi/examples/UnionFind.txt
+2
-1
idea/testData/psi/examples/collections/ArrayList.txt
idea/testData/psi/examples/collections/ArrayList.txt
+2
-1
idea/testData/psi/examples/collections/HashMap.txt
idea/testData/psi/examples/collections/HashMap.txt
+6
-3
idea/testData/psi/examples/collections/List.txt
idea/testData/psi/examples/collections/List.txt
+4
-2
idea/testData/psi/examples/priorityqueues/BinaryHeap.txt
idea/testData/psi/examples/priorityqueues/BinaryHeap.txt
+38
-19
idea/testData/resolve/Classifiers.jet
idea/testData/resolve/Classifiers.jet
+7
-2
idea/tests/org/jetbrains/jet/JetTestUtils.java
idea/tests/org/jetbrains/jet/JetTestUtils.java
+1
-0
未找到文件。
idea/src/org/jetbrains/jet/codegen/JetTypeMapper.java
浏览文件 @
6a03ec38
...
...
@@ -3,6 +3,7 @@ package org.jetbrains.jet.codegen;
import
com.intellij.psi.PsiClass
;
import
com.intellij.psi.PsiElement
;
import
jet.typeinfo.TypeInfo
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.jet.lang.descriptors.*
;
import
org.jetbrains.jet.lang.psi.*
;
import
org.jetbrains.jet.lang.resolve.BindingContext
;
...
...
@@ -125,7 +126,7 @@ public class JetTypeMapper {
return
mapType
(
jetType
,
OwnerKind
.
INTERFACE
);
}
public
Type
mapType
(
final
JetType
jetType
,
OwnerKind
kind
)
{
public
Type
mapType
(
@NotNull
final
JetType
jetType
,
OwnerKind
kind
)
{
if
(
jetType
.
equals
(
JetStandardClasses
.
getUnitType
())
||
jetType
.
equals
(
JetStandardClasses
.
getNothingType
()))
{
return
Type
.
VOID_TYPE
;
}
...
...
idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
浏览文件 @
6a03ec38
...
...
@@ -1520,7 +1520,10 @@ public class JetExpressionParsing extends AbstractJetParsing {
private
void
parseThisExpression
()
{
assert
_at
(
THIS_KEYWORD
);
PsiBuilder
.
Marker
mark
=
mark
();
PsiBuilder
.
Marker
thisReference
=
mark
();
advance
();
// THIS_KEYWORD
thisReference
.
done
(
REFERENCE_EXPRESSION
);
parseLabel
();
...
...
idea/src/org/jetbrains/jet/lang/psi/JetSimpleNameExpression.java
浏览文件 @
6a03ec38
...
...
@@ -15,7 +15,7 @@ import org.jetbrains.jet.lexer.JetTokens;
* @author max
*/
public
class
JetSimpleNameExpression
extends
JetReferenceExpression
{
public
static
final
TokenSet
REFERENCE_TOKENS
=
TokenSet
.
orSet
(
JetTokens
.
LABELS
,
TokenSet
.
create
(
JetTokens
.
IDENTIFIER
,
JetTokens
.
FIELD_IDENTIFIER
));
public
static
final
TokenSet
REFERENCE_TOKENS
=
TokenSet
.
orSet
(
JetTokens
.
LABELS
,
TokenSet
.
create
(
JetTokens
.
IDENTIFIER
,
JetTokens
.
FIELD_IDENTIFIER
,
JetTokens
.
THIS_KEYWORD
));
public
JetSimpleNameExpression
(
@NotNull
ASTNode
node
)
{
super
(
node
);
...
...
idea/src/org/jetbrains/jet/lang/psi/JetThisExpression.java
浏览文件 @
6a03ec38
...
...
@@ -24,4 +24,9 @@ public class JetThisExpression extends JetLabelQualifiedExpression {
return
(
JetTypeReference
)
findChildByType
(
JetNodeTypes
.
TYPE_REFERENCE
);
}
@NotNull
public
JetReferenceExpression
getThisReference
()
{
return
(
JetReferenceExpression
)
findChildByType
(
JetNodeTypes
.
REFERENCE_EXPRESSION
);
}
}
idea/src/org/jetbrains/jet/lang/resolve/AbstractScopeAdapter.java
浏览文件 @
6a03ec38
...
...
@@ -57,4 +57,8 @@ public abstract class AbstractScopeAdapter implements JetScope {
return
getWorkerScope
().
getPropertyByFieldReference
(
fieldName
);
}
@Override
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
return
getWorkerScope
().
getDeclarationDescriptorForUnqualifiedThis
();
}
}
idea/src/org/jetbrains/jet/lang/resolve/ChainedScope.java
浏览文件 @
6a03ec38
...
...
@@ -92,4 +92,19 @@ public class ChainedScope implements JetScope {
}
return
null
;
}
@Override
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
if
(
DescriptorUtils
.
definesItsOwnThis
(
getContainingDeclaration
()))
{
return
getContainingDeclaration
();
}
for
(
JetScope
jetScope
:
scopeChain
)
{
DeclarationDescriptor
containingDeclaration
=
jetScope
.
getContainingDeclaration
();
if
(
DescriptorUtils
.
definesItsOwnThis
(
containingDeclaration
))
{
return
containingDeclaration
;
}
}
return
null
;
}
}
idea/src/org/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java
浏览文件 @
6a03ec38
...
...
@@ -174,7 +174,6 @@ public class ClassDescriptorResolver {
WritableScope
innerScope
=
new
WritableScopeImpl
(
scope
,
functionDescriptor
,
trace
.
getErrorHandler
());
innerScope
.
addLabeledDeclaration
(
functionDescriptor
);
List
<
TypeParameterDescriptor
>
typeParameterDescriptors
=
resolveTypeParameters
(
functionDescriptor
,
innerScope
,
function
.
getTypeParameters
());
JetType
receiverType
=
null
;
...
...
idea/src/org/jetbrains/jet/lang/resolve/DescriptorUtils.java
0 → 100644
浏览文件 @
6a03ec38
package
org.jetbrains.jet.lang.resolve
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.jet.lang.descriptors.*
;
/**
* @author abreslav
*/
public
class
DescriptorUtils
{
public
static
boolean
definesItsOwnThis
(
@NotNull
DeclarationDescriptor
descriptor
)
{
return
descriptor
.
accept
(
new
DeclarationDescriptorVisitor
<
Boolean
,
Void
>()
{
@Override
public
Boolean
visitDeclarationDescriptor
(
DeclarationDescriptor
descriptor
,
Void
data
)
{
return
false
;
}
@Override
public
Boolean
visitFunctionDescriptor
(
FunctionDescriptor
descriptor
,
Void
data
)
{
return
descriptor
.
getReceiverType
()
!=
null
;
}
@Override
public
Boolean
visitClassDescriptor
(
ClassDescriptor
descriptor
,
Void
data
)
{
return
true
;
}
@Override
public
Boolean
visitPropertyDescriptor
(
PropertyDescriptor
descriptor
,
Void
data
)
{
return
descriptor
.
getReceiverType
()
!=
null
;
}
},
null
);
}
}
idea/src/org/jetbrains/jet/lang/resolve/JetScope.java
浏览文件 @
6a03ec38
...
...
@@ -46,4 +46,7 @@ public interface JetScope {
*/
@Nullable
PropertyDescriptor
getPropertyByFieldReference
(
@NotNull
String
fieldName
);
@Nullable
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
();
}
\ No newline at end of file
idea/src/org/jetbrains/jet/lang/resolve/JetScopeImpl.java
浏览文件 @
6a03ec38
...
...
@@ -48,4 +48,9 @@ public abstract class JetScopeImpl implements JetScope {
public
PropertyDescriptor
getPropertyByFieldReference
(
@NotNull
String
fieldName
)
{
return
null
;
}
@Override
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
return
null
;
}
}
idea/src/org/jetbrains/jet/lang/resolve/SubstitutingScope.java
浏览文件 @
6a03ec38
package
org.jetbrains.jet.lang.resolve
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.jet.lang.descriptors.*
;
import
org.jetbrains.jet.lang.types.*
;
...
...
@@ -79,4 +80,10 @@ public class SubstitutingScope implements JetScope {
public
PropertyDescriptor
getPropertyByFieldReference
(
@NotNull
String
fieldName
)
{
throw
new
UnsupportedOperationException
();
// TODO
}
@Override
@Nullable
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
return
workerScope
.
getDeclarationDescriptorForUnqualifiedThis
();
}
}
idea/src/org/jetbrains/jet/lang/resolve/WritableScopeImpl.java
浏览文件 @
6a03ec38
...
...
@@ -45,6 +45,14 @@ public class WritableScopeImpl extends WritableScopeWithImports {
return
ownerDeclarationDescriptor
;
}
@Override
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
if
(
DescriptorUtils
.
definesItsOwnThis
(
ownerDeclarationDescriptor
))
{
return
ownerDeclarationDescriptor
;
}
return
super
.
getDeclarationDescriptorForUnqualifiedThis
();
}
@NotNull
private
Map
<
String
,
List
<
DeclarationDescriptor
>>
getLabelsToDescriptors
()
{
if
(
labelsToDescriptors
==
null
)
{
...
...
idea/src/org/jetbrains/jet/lang/resolve/java/JavaClassMembersScope.java
浏览文件 @
6a03ec38
...
...
@@ -47,6 +47,11 @@ public class JavaClassMembersScope implements JetScope {
return
null
;
}
@Override
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
ClassifierDescriptor
getClassifier
(
@NotNull
String
name
)
{
ClassifierDescriptor
classifierDescriptor
=
classifiers
.
get
(
name
);
...
...
idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java
浏览文件 @
6a03ec38
...
...
@@ -59,6 +59,11 @@ public class ErrorUtils {
return
null
;
// TODO : review
}
@Override
public
DeclarationDescriptor
getDeclarationDescriptorForUnqualifiedThis
()
{
return
ERROR_CLASS
;
// TODO : review
}
};
private
static
final
FunctionGroup
ERROR_FUNCTION_GROUP
=
new
FunctionGroup
()
{
...
...
idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java
浏览文件 @
6a03ec38
...
...
@@ -933,28 +933,34 @@ public class JetTypeInferrer {
if
(
labelName
!=
null
)
{
Collection
<
DeclarationDescriptor
>
declarationsByLabel
=
scope
.
getDeclarationsByLabel
(
labelName
);
int
size
=
declarationsByLabel
.
size
();
final
JetSimpleNameExpression
targetLabel
=
expression
.
getTargetLabel
();
assert
targetLabel
!=
null
;
if
(
size
==
1
)
{
DeclarationDescriptor
declarationDescriptor
=
declarationsByLabel
.
iterator
().
next
();
if
(
declarationDescriptor
instanceof
ClassDescriptor
)
{
ClassDescriptor
classDescriptor
=
(
ClassDescriptor
)
declarationDescriptor
;
thisType
=
classDescriptor
.
getDefaultType
();
trace
.
recordReferenceResolution
(
expression
.
getTargetLabel
(),
classDescriptor
);
trace
.
recordReferenceResolution
(
targetLabel
,
classDescriptor
);
trace
.
recordReferenceResolution
(
expression
.
getThisReference
(),
classDescriptor
);
}
else
{
throw
new
UnsupportedOperationException
();
// TODO
}
}
else
if
(
size
==
0
)
{
trace
.
getErrorHandler
().
unresolvedReference
(
expression
.
getTargetLabel
()
);
trace
.
getErrorHandler
().
unresolvedReference
(
targetLabel
);
}
else
{
JetSimpleNameExpression
labelElement
=
expression
.
getTargetLabel
();
assert
labelElement
!=
null
;
trace
.
getErrorHandler
().
genericError
(
labelElement
.
getNode
(),
"Ambiguous label"
);
trace
.
getErrorHandler
().
genericError
(
targetLabel
.
getNode
(),
"Ambiguous label"
);
}
}
else
{
thisType
=
scope
.
getThisType
();
DeclarationDescriptor
declarationDescriptorForUnqualifiedThis
=
scope
.
getDeclarationDescriptorForUnqualifiedThis
();
if
(
declarationDescriptorForUnqualifiedThis
!=
null
)
{
trace
.
recordReferenceResolution
(
expression
.
getThisReference
(),
declarationDescriptorForUnqualifiedThis
);
}
}
if
(
thisType
!=
null
)
{
...
...
@@ -989,6 +995,9 @@ public class JetTypeInferrer {
}
else
{
result
=
thisType
;
}
if
(
result
!=
null
)
{
trace
.
recordExpressionType
(
expression
.
getThisReference
(),
result
);
}
}
}
}
...
...
@@ -1407,9 +1416,9 @@ public class JetTypeInferrer {
else
{
result
=
selectorReturnType
;
}
//
if (selectorExpression != null && result != null) {
//
trace.recordExpressionType(selectorExpression, result);
//
}
if
(
selectorExpression
!=
null
&&
result
!=
null
)
{
trace
.
recordExpressionType
(
selectorExpression
,
result
);
}
}
}
...
...
idea/testData/psi/AnnotatedExpressions.txt
浏览文件 @
6a03ec38
...
...
@@ -38,6 +38,7 @@ JetFile: AnnotatedExpressions.jet
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
\ No newline at end of file
idea/testData/psi/Labels.txt
浏览文件 @
6a03ec38
...
...
@@ -385,28 +385,33 @@ JetFile: Labels.jet
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace('\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
LABEL_QUALIFIER
LABEL_REFERENCE
PsiElement(AT)('@')
PsiWhiteSpace('\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
LABEL_QUALIFIER
LABEL_REFERENCE
PsiElement(LABEL_IDENTIFIER)('@a')
PsiWhiteSpace('\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
LABEL_QUALIFIER
LABEL_REFERENCE
PsiElement(ATAT)('@@')
PsiWhiteSpace('\n\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(LT)('<')
TYPE_REFERENCE
USER_TYPE
...
...
@@ -415,7 +420,8 @@ JetFile: Labels.jet
PsiElement(GT)('>')
PsiWhiteSpace('\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
LABEL_QUALIFIER
LABEL_REFERENCE
PsiElement(AT)('@')
...
...
@@ -427,7 +433,8 @@ JetFile: Labels.jet
PsiElement(GT)('>')
PsiWhiteSpace('\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
LABEL_QUALIFIER
LABEL_REFERENCE
PsiElement(LABEL_IDENTIFIER)('@a')
...
...
@@ -439,7 +446,8 @@ JetFile: Labels.jet
PsiElement(GT)('>')
PsiWhiteSpace('\n ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
LABEL_QUALIFIER
LABEL_REFERENCE
PsiElement(ATAT)('@@')
...
...
idea/testData/psi/Properties.txt
浏览文件 @
6a03ec38
...
...
@@ -768,7 +768,8 @@ JetFile: Properties.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('size')
...
...
idea/testData/psi/SimpleExpressions.txt
浏览文件 @
6a03ec38
...
...
@@ -261,7 +261,8 @@ JetFile: SimpleExpressions.jet
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(COMMA)(',')
PsiWhiteSpace('\n ')
VALUE_PARAMETER
...
...
@@ -277,7 +278,8 @@ JetFile: SimpleExpressions.jet
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(LT)('<')
TYPE_REFERENCE
USER_TYPE
...
...
idea/testData/psi/examples/BinaryTree.txt
浏览文件 @
6a03ec38
...
...
@@ -180,7 +180,8 @@ JetFile: BinaryTree.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('compare')
...
...
@@ -286,7 +287,8 @@ JetFile: BinaryTree.jet
PsiElement(LPAR)('(')
VALUE_ARGUMENT
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
...
...
@@ -1897,7 +1899,8 @@ JetFile: BinaryTree.jet
PsiElement(IDENTIFIER)('BinaryTree')
PsiElement(DOT)('.')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('version')
...
...
@@ -2475,7 +2478,8 @@ JetFile: BinaryTree.jet
PsiElement(IDENTIFIER)('BinaryTree')
PsiElement(DOT)('.')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('version')
...
...
@@ -2520,7 +2524,8 @@ JetFile: BinaryTree.jet
PsiElement(IDENTIFIER)('BinaryTree')
PsiElement(DOT)('.')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('version')
...
...
idea/testData/psi/examples/BitArith.txt
浏览文件 @
6a03ec38
...
...
@@ -499,7 +499,8 @@ JetFile: BitArith.jet
BINARY_EXPRESSION
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('and')
...
...
idea/testData/psi/examples/PolymorphicClassObjects.txt
浏览文件 @
6a03ec38
...
...
@@ -363,7 +363,8 @@ JetFile: PolymorphicClassObjects.jet
PsiWhiteSpace(' ')
LOOP_RANGE
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
...
...
idea/testData/psi/examples/UnionFind.txt
浏览文件 @
6a03ec38
...
...
@@ -388,7 +388,8 @@ JetFile: UnionFind.jet
BINARY_EXPRESSION
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(PERC)('%')
...
...
idea/testData/psi/examples/collections/ArrayList.txt
浏览文件 @
6a03ec38
...
...
@@ -350,7 +350,8 @@ JetFile: ArrayList.jet
PsiElement(IDENTIFIER)('ArrayList')
PsiElement(DOT)('.')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
CALL_EXPRESSION
REFERENCE_EXPRESSION
...
...
idea/testData/psi/examples/collections/HashMap.txt
浏览文件 @
6a03ec38
...
...
@@ -44,7 +44,8 @@ JetFile: HashMap.jet
PsiElement(LPAR)('(')
BINARY_WITH_TYPE
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(as)('as')
...
...
@@ -138,7 +139,8 @@ JetFile: HashMap.jet
PsiElement(LPAR)('(')
BINARY_WITH_TYPE
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(as)('as')
...
...
@@ -373,7 +375,8 @@ JetFile: HashMap.jet
PsiElement(LPAR)('(')
VALUE_ARGUMENT
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n\n')
CLASS
...
...
idea/testData/psi/examples/collections/List.txt
浏览文件 @
6a03ec38
...
...
@@ -202,7 +202,8 @@ JetFile: List.jet
PsiWhiteSpace(' ')
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(EQEQ)('==')
...
...
@@ -256,7 +257,8 @@ JetFile: List.jet
PsiElement(IDENTIFIER)('List')
PsiElement(DOT)('.')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
...
...
idea/testData/psi/examples/priorityqueues/BinaryHeap.txt
浏览文件 @
6a03ec38
...
...
@@ -138,7 +138,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('compare')
...
...
@@ -152,7 +153,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('data')
...
...
@@ -254,7 +256,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('compare')
...
...
@@ -268,7 +271,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('data')
...
...
@@ -297,7 +301,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('data')
...
...
@@ -343,7 +348,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('comparator')
...
...
@@ -393,7 +399,8 @@ JetFile: BinaryHeap.jet
CONDITION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('isEmpty')
...
...
@@ -942,7 +949,8 @@ JetFile: BinaryHeap.jet
PsiElement(LPAR)('(')
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MINUS)('-')
...
...
@@ -979,7 +987,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MUL)('*')
...
...
@@ -1015,7 +1024,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MUL)('*')
...
...
@@ -1067,7 +1077,8 @@ JetFile: BinaryHeap.jet
INDICES
PsiElement(LBRACKET)('[')
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n ')
PROPERTY_ACCESSOR
...
...
@@ -1117,7 +1128,8 @@ JetFile: BinaryHeap.jet
PsiElement(LPAR)('(')
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(LT)('<')
...
...
@@ -1137,7 +1149,8 @@ JetFile: BinaryHeap.jet
PsiElement(LPAR)('(')
BINARY_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(GTEQ)('>=')
...
...
@@ -1209,7 +1222,8 @@ JetFile: BinaryHeap.jet
PsiElement(LPAR)('(')
VALUE_ARGUMENT
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
...
...
@@ -1274,7 +1288,8 @@ JetFile: BinaryHeap.jet
PsiWhiteSpace(' ')
ARRAY_ACCESS_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
INDICES
PsiElement(LBRACKET)('[')
REFERENCE_EXPRESSION
...
...
@@ -1284,7 +1299,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
ARRAY_ACCESS_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
INDICES
PsiElement(LBRACKET)('[')
REFERENCE_EXPRESSION
...
...
@@ -1296,7 +1312,8 @@ JetFile: BinaryHeap.jet
PsiWhiteSpace(' ')
ARRAY_ACCESS_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
INDICES
PsiElement(LBRACKET)('[')
REFERENCE_EXPRESSION
...
...
@@ -1306,7 +1323,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
ARRAY_ACCESS_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
INDICES
PsiElement(LBRACKET)('[')
REFERENCE_EXPRESSION
...
...
@@ -1356,7 +1374,8 @@ JetFile: BinaryHeap.jet
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
THIS_EXPRESSION
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('size')
...
...
idea/testData/resolve/Classifiers.jet
浏览文件 @
6a03ec38
...
...
@@ -2,8 +2,13 @@ namespace qualified_this {
~qtA~class A(val a:Int) {
~qtB~class B() {
val x = this`qtB`@B
val y = this`qtA`@A
val x = `qtB`this`qtB`@B
val y = `qtA`this`qtA`@A
val z = `qtB`this
~xx~val Int.xx = `xx`this : Int
~xx()~fun Int.xx() {
`xx()`this : Int
}
}
}
}
...
...
idea/tests/org/jetbrains/jet/JetTestUtils.java
浏览文件 @
6a03ec38
...
...
@@ -178,6 +178,7 @@ public class JetTestUtils {
public
Collection
<
JetDiagnostic
>
getDiagnostics
()
{
throw
new
UnsupportedOperationException
();
// TODO
}
};
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录