Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
efd417e0
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,发现更多精彩内容 >>
提交
efd417e0
编写于
6月 02, 2011
作者:
A
Andrey Breslav
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Parsing object declarations
上级
7ad60022
变更
19
显示空白变更内容
内联
并排
Showing
19 changed file
with
2001 addition
and
1913 deletion
+2001
-1913
grammar/src/class_members.grm
grammar/src/class_members.grm
+5
-1
grammar/src/expressions.grm
grammar/src/expressions.grm
+1
-0
grammar/src/toplevel.grm
grammar/src/toplevel.grm
+1
-0
idea/src/org/jetbrains/jet/JetNodeTypes.java
idea/src/org/jetbrains/jet/JetNodeTypes.java
+1
-0
idea/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java
...c/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java
+1
-1
idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
.../org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
+8
-21
idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java
idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java
+51
-2
idea/src/org/jetbrains/jet/lang/psi/JetObjectDeclaration.java
.../src/org/jetbrains/jet/lang/psi/JetObjectDeclaration.java
+40
-0
idea/src/org/jetbrains/jet/lang/psi/JetObjectLiteralExpression.java
...rg/jetbrains/jet/lang/psi/JetObjectLiteralExpression.java
+3
-24
idea/testData/psi/ByCaluses.txt
idea/testData/psi/ByCaluses.txt
+26
-25
idea/testData/psi/SimpleClassMembers.txt
idea/testData/psi/SimpleClassMembers.txt
+442
-426
idea/testData/psi/SimpleExpressions.txt
idea/testData/psi/SimpleExpressions.txt
+14
-13
idea/testData/psi/examples/AnonymousObjects.txt
idea/testData/psi/examples/AnonymousObjects.txt
+141
-139
idea/testData/psi/examples/BinaryTree.txt
idea/testData/psi/examples/BinaryTree.txt
+629
-628
idea/testData/psi/examples/Builder.txt
idea/testData/psi/examples/Builder.txt
+179
-178
idea/testData/psi/examples/PolymorphicClassObjects.txt
idea/testData/psi/examples/PolymorphicClassObjects.txt
+57
-56
idea/testData/psi/examples/UpdateOperation.txt
idea/testData/psi/examples/UpdateOperation.txt
+76
-75
idea/testData/psi/examples/collections/ArrayList.txt
idea/testData/psi/examples/collections/ArrayList.txt
+229
-228
idea/testData/psi/examples/collections/List.txt
idea/testData/psi/examples/collections/List.txt
+97
-96
未找到文件。
grammar/src/class_members.grm
浏览文件 @
efd417e0
...
@@ -32,6 +32,7 @@ class Example(a : Foo, i : Int) : Bar(i), Some {
...
@@ -32,6 +32,7 @@ class Example(a : Foo, i : Int) : Bar(i), Some {
memberDeclaration
memberDeclaration
: classObject
: classObject
: object
: constructor
: constructor
: function
: function
: property
: property
...
@@ -100,3 +101,6 @@ setter
...
@@ -100,3 +101,6 @@ setter
parameter
parameter
: SimpleName ":" type
: SimpleName ":" type
;
;
object
: "object" SimpleName ":" ":" delegationSpecifier{","}? classBody? // Class body can be optional: this is a declaration
\ No newline at end of file
grammar/src/expressions.grm
浏览文件 @
efd417e0
...
@@ -124,6 +124,7 @@ declaration
...
@@ -124,6 +124,7 @@ declaration
: extension
: extension
: class
: class
: typedef
: typedef
: object
;
;
statement
statement
...
...
grammar/src/toplevel.grm
浏览文件 @
efd417e0
...
@@ -21,6 +21,7 @@ import
...
@@ -21,6 +21,7 @@ import
toplevelObject
toplevelObject
: namespace
: namespace
: class
: class
: object
: extension
: extension
: function
: function
: property
: property
...
...
idea/src/org/jetbrains/jet/JetNodeTypes.java
浏览文件 @
efd417e0
...
@@ -16,6 +16,7 @@ public interface JetNodeTypes {
...
@@ -16,6 +16,7 @@ public interface JetNodeTypes {
JetNodeType
FUN
=
new
JetNodeType
(
"FUN"
,
JetFunction
.
class
);
JetNodeType
FUN
=
new
JetNodeType
(
"FUN"
,
JetFunction
.
class
);
JetNodeType
EXTENSION
=
new
JetNodeType
(
"EXTENSION"
,
JetExtension
.
class
);
JetNodeType
EXTENSION
=
new
JetNodeType
(
"EXTENSION"
,
JetExtension
.
class
);
JetNodeType
TYPEDEF
=
new
JetNodeType
(
"TYPEDEF"
,
JetTypedef
.
class
);
JetNodeType
TYPEDEF
=
new
JetNodeType
(
"TYPEDEF"
,
JetTypedef
.
class
);
JetNodeType
OBJECT_DECLARATION
=
new
JetNodeType
(
"OBJECT_DECLARATION"
,
JetObjectDeclaration
.
class
);
JetNodeType
CLASS_OBJECT
=
new
JetNodeType
(
"CLASS_OBJECT"
,
JetClassObject
.
class
);
JetNodeType
CLASS_OBJECT
=
new
JetNodeType
(
"CLASS_OBJECT"
,
JetClassObject
.
class
);
JetNodeType
CONSTRUCTOR
=
new
JetNodeType
(
"CONSTRUCTOR"
,
JetConstructor
.
class
);
JetNodeType
CONSTRUCTOR
=
new
JetNodeType
(
"CONSTRUCTOR"
,
JetConstructor
.
class
);
...
...
idea/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java
浏览文件 @
efd417e0
...
@@ -597,7 +597,7 @@ public class JetControlFlowProcessor {
...
@@ -597,7 +597,7 @@ public class JetControlFlowProcessor {
@Override
@Override
public
void
visitObjectLiteralExpression
(
JetObjectLiteralExpression
expression
)
{
public
void
visitObjectLiteralExpression
(
JetObjectLiteralExpression
expression
)
{
List
<
JetDelegationSpecifier
>
delegationSpecifiers
=
expression
.
getDelegationSpecifiers
();
List
<
JetDelegationSpecifier
>
delegationSpecifiers
=
expression
.
get
ObjectDeclaration
().
get
DelegationSpecifiers
();
for
(
JetDelegationSpecifier
delegationSpecifier
:
delegationSpecifiers
)
{
for
(
JetDelegationSpecifier
delegationSpecifier
:
delegationSpecifiers
)
{
if
(
delegationSpecifier
instanceof
JetDelegatorByExpressionSpecifier
)
{
if
(
delegationSpecifier
instanceof
JetDelegatorByExpressionSpecifier
)
{
JetDelegatorByExpressionSpecifier
specifier
=
(
JetDelegatorByExpressionSpecifier
)
delegationSpecifier
;
JetDelegatorByExpressionSpecifier
specifier
=
(
JetDelegatorByExpressionSpecifier
)
delegationSpecifier
;
...
...
idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
浏览文件 @
efd417e0
...
@@ -1140,6 +1140,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
...
@@ -1140,6 +1140,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
* : extension
* : extension
* : class
* : class
* : typedef
* : typedef
* : object
* ;
* ;
*/
*/
private
JetNodeType
parseLocalDeclarationRest
(
boolean
isEnum
)
{
private
JetNodeType
parseLocalDeclarationRest
(
boolean
isEnum
)
{
...
@@ -1160,6 +1161,10 @@ public class JetExpressionParsing extends AbstractJetParsing {
...
@@ -1160,6 +1161,10 @@ public class JetExpressionParsing extends AbstractJetParsing {
else
if
(
keywordToken
==
TYPE_KEYWORD
)
{
else
if
(
keywordToken
==
TYPE_KEYWORD
)
{
declType
=
myJetParsing
.
parseTypeDef
();
declType
=
myJetParsing
.
parseTypeDef
();
}
}
else
if
(
keywordToken
==
OBJECT_KEYWORD
)
{
myJetParsing
.
parseObject
(
true
);
declType
=
OBJECT_DECLARATION
;
}
return
declType
;
return
declType
;
}
}
...
@@ -1594,29 +1599,11 @@ public class JetExpressionParsing extends AbstractJetParsing {
...
@@ -1594,29 +1599,11 @@ public class JetExpressionParsing extends AbstractJetParsing {
argument
.
done
(
VALUE_ARGUMENT
);
argument
.
done
(
VALUE_ARGUMENT
);
}
}
/*
* objectLiteral
* : "object" ":" delegationSpecifier{","}? classBody // Cannot make class body optional: foo(object F, a)
* ;
*/
public
void
parseObjectLiteral
()
{
public
void
parseObjectLiteral
()
{
assert
_at
(
OBJECT_KEYWORD
);
PsiBuilder
.
Marker
literal
=
mark
();
PsiBuilder
.
Marker
literal
=
mark
();
PsiBuilder
.
Marker
declaration
=
mark
();
advance
();
// OBJECT_KEYWORD
myJetParsing
.
parseObject
(
false
);
declaration
.
done
(
OBJECT_DECLARATION
);
if
(
at
(
LBRACE
))
{
myJetParsing
.
parseClassBody
();
}
else
{
expect
(
COLON
,
"Expecting ':'"
,
TokenSet
.
create
(
IDENTIFIER
,
NAMESPACE_KEYWORD
));
myJetParsing
.
parseDelegationSpecifierList
();
if
(
at
(
LBRACE
))
{
myJetParsing
.
parseClassBody
();
}
}
literal
.
done
(
OBJECT_LITERAL
);
literal
.
done
(
OBJECT_LITERAL
);
}
}
...
...
idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java
浏览文件 @
efd417e0
...
@@ -213,6 +213,7 @@ public class JetParsing extends AbstractJetParsing {
...
@@ -213,6 +213,7 @@ public class JetParsing extends AbstractJetParsing {
* : function
* : function
* : property
* : property
* : typedef
* : typedef
* : object
* ;
* ;
*/
*/
private
void
parseTopLevelObject
()
{
private
void
parseTopLevelObject
()
{
...
@@ -241,6 +242,10 @@ public class JetParsing extends AbstractJetParsing {
...
@@ -241,6 +242,10 @@ public class JetParsing extends AbstractJetParsing {
else
if
(
keywordToken
==
TYPE_KEYWORD
)
{
else
if
(
keywordToken
==
TYPE_KEYWORD
)
{
declType
=
parseTypeDef
();
declType
=
parseTypeDef
();
}
}
else
if
(
keywordToken
==
OBJECT_KEYWORD
)
{
parseObject
(
true
);
declType
=
OBJECT_DECLARATION
;
}
if
(
declType
==
null
)
{
if
(
declType
==
null
)
{
errorAndAdvance
(
"Expecting namespace or top level declaration"
);
errorAndAdvance
(
"Expecting namespace or top level declaration"
);
...
@@ -504,11 +509,10 @@ public class JetParsing extends AbstractJetParsing {
...
@@ -504,11 +509,10 @@ public class JetParsing extends AbstractJetParsing {
* ;
* ;
*/
*/
/*package*/
void
parseClassBody
()
{
/*package*/
void
parseClassBody
()
{
assert
_at
(
LBRACE
);
PsiBuilder
.
Marker
body
=
mark
();
PsiBuilder
.
Marker
body
=
mark
();
myBuilder
.
enableNewlines
();
myBuilder
.
enableNewlines
();
advance
();
// LBRACE
expect
(
LBRACE
,
"Expecting a class body"
,
TokenSet
.
create
(
LBRACE
));
while
(!
eof
())
{
while
(!
eof
())
{
if
(
at
(
RBRACE
))
{
if
(
at
(
RBRACE
))
{
...
@@ -536,6 +540,7 @@ public class JetParsing extends AbstractJetParsing {
...
@@ -536,6 +540,7 @@ public class JetParsing extends AbstractJetParsing {
* : extension
* : extension
* : typedef
* : typedef
* : anonymousInitializer
* : anonymousInitializer
* : object
* ;
* ;
*/
*/
private
void
parseMemberDeclaration
()
{
private
void
parseMemberDeclaration
()
{
...
@@ -580,6 +585,10 @@ public class JetParsing extends AbstractJetParsing {
...
@@ -580,6 +585,10 @@ public class JetParsing extends AbstractJetParsing {
}
}
else
if
(
keywordToken
==
THIS_KEYWORD
)
{
else
if
(
keywordToken
==
THIS_KEYWORD
)
{
declType
=
parseConstructor
();
declType
=
parseConstructor
();
}
else
if
(
keywordToken
==
OBJECT_KEYWORD
)
{
parseObject
(
true
);
declType
=
OBJECT_DECLARATION
;
}
else
if
(
keywordToken
==
LBRACE
)
{
}
else
if
(
keywordToken
==
LBRACE
)
{
parseBlock
();
parseBlock
();
declType
=
ANONYMOUS_INITIALIZER
;
declType
=
ANONYMOUS_INITIALIZER
;
...
@@ -587,6 +596,46 @@ public class JetParsing extends AbstractJetParsing {
...
@@ -587,6 +596,46 @@ public class JetParsing extends AbstractJetParsing {
return
declType
;
return
declType
;
}
}
/*
* object
* : "object" SimpleName? ":" delegationSpecifier{","}? classBody // Cannot make class body optional: foo(object F, a)
* ;
*/
public
void
parseObject
(
boolean
declaration
)
{
assert
_at
(
OBJECT_KEYWORD
);
advance
();
// OBJECT_KEYWORD
if
(
declaration
)
{
expect
(
IDENTIFIER
,
"Expecting object name"
,
TokenSet
.
create
(
LBRACE
));
}
else
{
if
(
at
(
IDENTIFIER
))
{
error
(
"An object expression cannot bind a name"
);
}
}
if
(
declaration
)
{
// Body is optional
if
(
at
(
COLON
))
{
advance
();
// COLON
parseDelegationSpecifierList
();
}
if
(
at
(
LBRACE
))
{
parseClassBody
();
}
}
else
{
if
(
at
(
LBRACE
))
{
parseClassBody
();
}
else
{
expect
(
COLON
,
"Expecting ':'"
,
TokenSet
.
create
(
IDENTIFIER
,
NAMESPACE_KEYWORD
));
parseDelegationSpecifierList
();
parseClassBody
();
}
}
}
/*
/*
* constructor
* constructor
* : modifiers "this" functionParameters (":" initializer{","}) block?
* : modifiers "this" functionParameters (":" initializer{","}) block?
...
...
idea/src/org/jetbrains/jet/lang/psi/JetObjectDeclaration.java
0 → 100644
浏览文件 @
efd417e0
package
org.jetbrains.jet.lang.psi
;
import
com.intellij.lang.ASTNode
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.jet.JetNodeTypes
;
import
java.util.Collections
;
import
java.util.List
;
/**
* @author abreslav
*/
public
class
JetObjectDeclaration
extends
JetNamedDeclaration
implements
JetClassOrObject
{
public
JetObjectDeclaration
(
@NotNull
ASTNode
node
)
{
super
(
node
);
}
@Override
@Nullable
public
JetDelegationSpecifierList
getDelegationSpecifierList
()
{
return
(
JetDelegationSpecifierList
)
findChildByType
(
JetNodeTypes
.
DELEGATION_SPECIFIER_LIST
);
}
@Override
@NotNull
public
List
<
JetDelegationSpecifier
>
getDelegationSpecifiers
()
{
JetDelegationSpecifierList
list
=
getDelegationSpecifierList
();
return
list
!=
null
?
list
.
getDelegationSpecifiers
()
:
Collections
.<
JetDelegationSpecifier
>
emptyList
();
}
@Override
@NotNull
public
List
<
JetDeclaration
>
getDeclarations
()
{
JetClassBody
body
=
(
JetClassBody
)
findChildByType
(
JetNodeTypes
.
CLASS_BODY
);
if
(
body
==
null
)
return
Collections
.
emptyList
();
return
body
.
getDeclarations
();
}
}
idea/src/org/jetbrains/jet/lang/psi/JetObjectLiteralExpression.java
浏览文件 @
efd417e0
...
@@ -2,16 +2,12 @@ package org.jetbrains.jet.lang.psi;
...
@@ -2,16 +2,12 @@ package org.jetbrains.jet.lang.psi;
import
com.intellij.lang.ASTNode
;
import
com.intellij.lang.ASTNode
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.jet.JetNodeTypes
;
import
org.jetbrains.jet.JetNodeTypes
;
import
java.util.Collections
;
import
java.util.List
;
/**
/**
* @author max
* @author max
*/
*/
public
class
JetObjectLiteralExpression
extends
JetExpression
implements
JetClassOrObject
{
public
class
JetObjectLiteralExpression
extends
JetExpression
{
public
JetObjectLiteralExpression
(
@NotNull
ASTNode
node
)
{
public
JetObjectLiteralExpression
(
@NotNull
ASTNode
node
)
{
super
(
node
);
super
(
node
);
}
}
...
@@ -21,25 +17,8 @@ public class JetObjectLiteralExpression extends JetExpression implements JetClas
...
@@ -21,25 +17,8 @@ public class JetObjectLiteralExpression extends JetExpression implements JetClas
visitor
.
visitObjectLiteralExpression
(
this
);
visitor
.
visitObjectLiteralExpression
(
this
);
}
}
@Override
@Nullable
public
JetDelegationSpecifierList
getDelegationSpecifierList
()
{
return
(
JetDelegationSpecifierList
)
findChildByType
(
JetNodeTypes
.
DELEGATION_SPECIFIER_LIST
);
}
@Override
@NotNull
public
List
<
JetDelegationSpecifier
>
getDelegationSpecifiers
()
{
JetDelegationSpecifierList
list
=
getDelegationSpecifierList
();
return
list
!=
null
?
list
.
getDelegationSpecifiers
()
:
Collections
.<
JetDelegationSpecifier
>
emptyList
();
}
@Override
@NotNull
@NotNull
public
List
<
JetDeclaration
>
getDeclarations
()
{
public
JetObjectDeclaration
getObjectDeclaration
()
{
JetClassBody
body
=
(
JetClassBody
)
findChildByType
(
JetNodeTypes
.
CLASS_BODY
);
return
(
JetObjectDeclaration
)
findChildByType
(
JetNodeTypes
.
OBJECT_DECLARATION
);
if
(
body
==
null
)
return
Collections
.
emptyList
();
return
body
.
getDeclarations
();
}
}
}
}
idea/testData/psi/ByCaluses.txt
浏览文件 @
efd417e0
...
@@ -293,6 +293,7 @@ JetFile: ByCaluses.jet
...
@@ -293,6 +293,7 @@ JetFile: ByCaluses.jet
PsiElement(by)('by')
PsiElement(by)('by')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
...
idea/testData/psi/SimpleClassMembers.txt
浏览文件 @
efd417e0
...
@@ -172,6 +172,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -172,6 +172,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
@@ -186,6 +187,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -186,6 +187,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
@@ -200,6 +202,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -200,6 +202,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -223,6 +226,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -223,6 +226,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -258,6 +262,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -258,6 +262,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -291,6 +296,8 @@ JetFile: SimpleClassMembers.jet
...
@@ -291,6 +296,8 @@ JetFile: SimpleClassMembers.jet
PsiElement(LPAR)('(')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n ')
CLASS_BODY
PsiErrorElement:Expecting a class body
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
PsiWhiteSpace('\n\n ')
CLASS
CLASS
...
@@ -529,6 +536,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -529,6 +536,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
@@ -543,6 +551,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -543,6 +551,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
@@ -557,6 +566,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -557,6 +566,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -580,6 +590,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -580,6 +590,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -615,6 +626,7 @@ JetFile: SimpleClassMembers.jet
...
@@ -615,6 +626,7 @@ JetFile: SimpleClassMembers.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -648,4 +660,8 @@ JetFile: SimpleClassMembers.jet
...
@@ -648,4 +660,8 @@ JetFile: SimpleClassMembers.jet
PsiElement(LPAR)('(')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n\n\n')
PsiWhiteSpace('\n\n\n')
CLASS_BODY
PsiErrorElement:Expecting a class body
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
PsiErrorElement:Missing '}
<empty list>
\ No newline at end of file
idea/testData/psi/SimpleExpressions.txt
浏览文件 @
efd417e0
...
@@ -485,6 +485,7 @@ JetFile: SimpleExpressions.jet
...
@@ -485,6 +485,7 @@ JetFile: SimpleExpressions.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
...
idea/testData/psi/examples/AnonymousObjects.txt
浏览文件 @
efd417e0
...
@@ -18,6 +18,7 @@ JetFile: AnonymousObjects.jet
...
@@ -18,6 +18,7 @@ JetFile: AnonymousObjects.jet
PsiElement(LPAR)('(')
PsiElement(LPAR)('(')
VALUE_ARGUMENT
VALUE_ARGUMENT
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
@@ -155,6 +156,7 @@ JetFile: AnonymousObjects.jet
...
@@ -155,6 +156,7 @@ JetFile: AnonymousObjects.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
...
idea/testData/psi/examples/BinaryTree.txt
浏览文件 @
efd417e0
...
@@ -1872,6 +1872,7 @@ JetFile: BinaryTree.jet
...
@@ -1872,6 +1872,7 @@ JetFile: BinaryTree.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
...
idea/testData/psi/examples/Builder.txt
浏览文件 @
efd417e0
...
@@ -9,6 +9,7 @@ JetFile: Builder.jet
...
@@ -9,6 +9,7 @@ JetFile: Builder.jet
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
DOT_QUALIFIED_EXPRESSION
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
...
idea/testData/psi/examples/PolymorphicClassObjects.txt
浏览文件 @
efd417e0
...
@@ -135,6 +135,7 @@ JetFile: PolymorphicClassObjects.jet
...
@@ -135,6 +135,7 @@ JetFile: PolymorphicClassObjects.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
...
idea/testData/psi/examples/UpdateOperation.txt
浏览文件 @
efd417e0
...
@@ -37,6 +37,7 @@ JetFile: UpdateOperation.jet
...
@@ -37,6 +37,7 @@ JetFile: UpdateOperation.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
...
...
idea/testData/psi/examples/collections/ArrayList.txt
浏览文件 @
efd417e0
...
@@ -140,6 +140,7 @@ JetFile: ArrayList.jet
...
@@ -140,6 +140,7 @@ JetFile: ArrayList.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
...
idea/testData/psi/examples/collections/List.txt
浏览文件 @
efd417e0
...
@@ -225,6 +225,7 @@ JetFile: List.jet
...
@@ -225,6 +225,7 @@ JetFile: List.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiElement(COLON)(':')
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录