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
...
@@ -99,4 +100,7 @@ setter
...
@@ -99,4 +100,7 @@ setter
parameter
parameter
: SimpleName ":" type
: SimpleName ":" type
;
;
\ No newline at end of file
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,32 +293,33 @@ JetFile: ByCaluses.jet
...
@@ -293,32 +293,33 @@ JetFile: ByCaluses.jet
PsiElement(by)('by')
PsiElement(by)('by')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n ')
PsiElement(LBRACE)('{')
FUN
PsiWhiteSpace('\n ')
PsiElement(fun)('fun')
FUN
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiElement(IDENTIFIER)('f')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(IDENTIFIER)('f')
PsiElement(LBRACE)('{')
VALUE_PARAMETER_LIST
BODY
PsiElement(LPAR)('(')
<empty list>
PsiElement(RPAR)(')')
PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiWhiteSpace('\n')
PsiElement(EQ)('=')
PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
BODY
<empty list>
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
CLASS_BODY
CLASS_BODY
PsiElement(LBRACE)('{')
PsiElement(LBRACE)('{')
...
...
idea/testData/psi/SimpleClassMembers.txt
浏览文件 @
efd417e0
此差异已折叠。
点击以展开。
idea/testData/psi/SimpleExpressions.txt
浏览文件 @
efd417e0
...
@@ -485,19 +485,20 @@ JetFile: SimpleExpressions.jet
...
@@ -485,19 +485,20 @@ JetFile: SimpleExpressions.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
DELEGATION_SPECIFIER_LIST
PsiWhiteSpace(' ')
DELEGATOR_SUPER_CLASS
DELEGATION_SPECIFIER_LIST
TYPE_REFERENCE
DELEGATOR_SUPER_CLASS
USER_TYPE
TYPE_REFERENCE
REFERENCE_EXPRESSION
USER_TYPE
PsiElement(IDENTIFIER)('Foo')
REFERENCE_EXPRESSION
CLASS_BODY
PsiElement(IDENTIFIER)('Foo')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiElement(RBRACE)('}')
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiElement(COMMA)(',')
PsiElement(COMMA)(',')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n ')
VALUE_PARAMETER
VALUE_PARAMETER
...
...
idea/testData/psi/examples/AnonymousObjects.txt
浏览文件 @
efd417e0
...
@@ -18,106 +18,107 @@ JetFile: AnonymousObjects.jet
...
@@ -18,106 +18,107 @@ JetFile: AnonymousObjects.jet
PsiElement(LPAR)('(')
PsiElement(LPAR)('(')
VALUE_ARGUMENT
VALUE_ARGUMENT
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
DELEGATION_SPECIFIER_LIST
PsiWhiteSpace(' ')
DELEGATOR_SUPER_CALL
DELEGATION_SPECIFIER_LIST
TYPE_REFERENCE
DELEGATOR_SUPER_CALL
USER_TYPE
TYPE_REFERENCE
REFERENCE_EXPRESSION
USER_TYPE
PsiElement(IDENTIFIER)('MouseAdapter')
REFERENCE_EXPRESSION
VALUE_ARGUMENT_LIST
PsiElement(IDENTIFIER)('MouseAdapter')
PsiElement(LPAR)('(')
VALUE_ARGUMENT_LIST
PsiElement(RPAR)(')')
PsiElement(LPAR)('(')
PsiWhiteSpace(' ')
PsiElement(RPAR)(')')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n\n ')
PsiElement(LBRACE)('{')
PROPERTY
PsiWhiteSpace('\n\n ')
MODIFIER_LIST
PROPERTY
PsiElement(private)('private')
MODIFIER_LIST
PsiWhiteSpace(' ')
PsiElement(private)('private')
PsiElement(var)('var')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(var)('var')
PsiElement(IDENTIFIER)('clickCount')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('clickCount')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
INTEGER_CONSTANT
PsiWhiteSpace(' ')
PsiElement(INTEGER_LITERAL)('0')
INTEGER_CONSTANT
PsiElement(SEMICOLON)(';')
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace('\n\n ')
FUN
MODIFIER_LIST
PsiElement(override)('override')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('mouseClicked')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('e')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('MouseEvent')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
POSTFIX_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('clickCount')
OPERATION_REFERENCE
PsiElement(PLUSPLUS)('++')
PsiElement(SEMICOLON)(';')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n\n ')
IF
FUN
PsiElement(if)('if')
MODIFIER_LIST
PsiWhiteSpace(' ')
PsiElement(override)('override')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('mouseClicked')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(LPAR)('(')
CONDITION
VALUE_PARAMETER
BINARY_EXPRESSION
PsiElement(IDENTIFIER)('e')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('clickCount')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
TYPE_REFERENCE
PsiElement(GT)('>')
USER_TYPE
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
INTEGER_CONSTANT
PsiElement(IDENTIFIER)('MouseEvent')
PsiElement(INTEGER_LITERAL)('3')
PsiElement(RPAR)(')')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
THEN
BLOCK
DOT_QUALIFIED_EXPRESSION
PsiElement(LBRACE)('{')
REFERENCE_EXPRESSION
PsiWhiteSpace('\n ')
PsiElement(IDENTIFIER)('GOD')
POSTFIX_EXPRESSION
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
CALL_EXPRESSION
PsiElement(IDENTIFIER)('clickCount')
OPERATION_REFERENCE
PsiElement(PLUSPLUS)('++')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n ')
IF
PsiElement(if)('if')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
CONDITION
BINARY_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('sendMessage')
PsiElement(IDENTIFIER)('clickCount')
VALUE_ARGUMENT_LIST
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
OPERATION_REFERENCE
VALUE_ARGUMENT
PsiElement(GT)('>')
DOT_QUALIFIED_EXPRESSION
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
INTEGER_CONSTANT
PsiElement(IDENTIFIER)('GodMEssages')
PsiElement(INTEGER_LITERAL)('3')
PsiElement(DOT)('.')
PsiElement(RPAR)(')')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('TOO_MANY_CLICKS')
THEN
PsiElement(RPAR)(')')
DOT_QUALIFIED_EXPRESSION
PsiElement(SEMICOLON)(';')
REFERENCE_EXPRESSION
PsiWhiteSpace('\n ')
PsiElement(IDENTIFIER)('GOD')
PsiElement(RBRACE)('}')
PsiElement(DOT)('.')
PsiWhiteSpace('\n')
CALL_EXPRESSION
PsiElement(RBRACE)('}')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('sendMessage')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('GodMEssages')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('TOO_MANY_CLICKS')
PsiElement(RPAR)(')')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n\n')
PsiWhiteSpace('\n\n')
CLASS
CLASS
...
@@ -155,52 +156,53 @@ JetFile: AnonymousObjects.jet
...
@@ -155,52 +156,53 @@ JetFile: AnonymousObjects.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n ')
PsiElement(LBRACE)('{')
FUN
PsiWhiteSpace('\n ')
PsiElement(fun)('fun')
FUN
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiElement(IDENTIFIER)('sendMessage')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('message')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('GodMEssage')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
THROW
PsiElement(throw)('throw')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
NEW
PsiElement(IDENTIFIER)('sendMessage')
PsiElement(new)('new')
VALUE_PARAMETER_LIST
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
TYPE_REFERENCE
VALUE_PARAMETER
USER_TYPE
PsiElement(IDENTIFIER)('message')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('RuntimeException')
PsiElement(COLON)(':')
VALUE_ARGUMENT_LIST
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
TYPE_REFERENCE
VALUE_ARGUMENT
USER_TYPE
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('message')
PsiElement(IDENTIFIER)('GodMEssage')
PsiElement(DOT)('.')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
THROW
PsiElement(throw)('throw')
PsiWhiteSpace(' ')
NEW
PsiElement(new)('new')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('name')
PsiElement(IDENTIFIER)('RuntimeException')
PsiElement(RPAR)(')')
VALUE_ARGUMENT_LIST
PsiWhiteSpace('\n')
PsiElement(LPAR)('(')
PsiElement(RBRACE)('}')
VALUE_ARGUMENT
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('message')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('name')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiElement(SEMICOLON)(';')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n\n')
PsiWhiteSpace('\n\n')
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
\ No newline at end of file
idea/testData/psi/examples/BinaryTree.txt
浏览文件 @
efd417e0
此差异已折叠。
点击以展开。
idea/testData/psi/examples/Builder.txt
浏览文件 @
efd417e0
...
@@ -9,194 +9,195 @@ JetFile: Builder.jet
...
@@ -9,194 +9,195 @@ JetFile: Builder.jet
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
DOT_QUALIFIED_EXPRESSION
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
DELEGATION_SPECIFIER_LIST
PsiWhiteSpace(' ')
DELEGATOR_SUPER_CALL
DELEGATION_SPECIFIER_LIST
TYPE_REFERENCE
DELEGATOR_SUPER_CALL
USER_TYPE
TYPE_REFERENCE
REFERENCE_EXPRESSION
USER_TYPE
PsiElement(IDENTIFIER)('AntBuilder')
REFERENCE_EXPRESSION
VALUE_ARGUMENT_LIST
PsiElement(IDENTIFIER)('AntBuilder')
PsiElement(LPAR)('(')
VALUE_ARGUMENT_LIST
PsiElement(RPAR)(')')
PsiElement(LPAR)('(')
PsiWhiteSpace(' ')
PsiElement(RPAR)(')')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n\n ')
PsiElement(LBRACE)('{')
PROPERTY
PsiWhiteSpace('\n\n ')
MODIFIER_LIST
PROPERTY
ATTRIBUTE_ANNOTATION
MODIFIER_LIST
PsiElement(LBRACKET)('[')
ATTRIBUTE_ANNOTATION
ATTRIBUTE
PsiElement(LBRACKET)('[')
TYPE_REFERENCE
ATTRIBUTE
USER_TYPE
TYPE_REFERENCE
REFERENCE_EXPRESSION
USER_TYPE
PsiElement(IDENTIFIER)('lazy')
REFERENCE_EXPRESSION
PsiElement(RBRACKET)(']')
PsiElement(IDENTIFIER)('lazy')
PsiWhiteSpace(' ')
PsiElement(RBRACKET)(']')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('groovy')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('library')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(val)('val')
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
BODY
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('classpath')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_CONSTANT
PsiElement(STRING_LITERAL)('"$libs/groovy-..."')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
ATTRIBUTE_ANNOTATION
PsiElement(LBRACKET)('[')
ATTRIBUTE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('gant')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('library')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(IDENTIFIER)('groovy')
PsiElement(LBRACE)('{')
PsiWhiteSpace(' ')
PsiWhiteSpace('\n ')
PsiElement(EQ)('=')
BODY
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
CALL_EXPRESSION
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
NEW
PsiElement(IDENTIFIER)('library')
PsiElement(new)('new')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
TYPE_REFERENCE
PsiElement(LBRACE)('{')
USER_TYPE
PsiWhiteSpace('\n ')
REFERENCE_EXPRESSION
BODY
PsiElement(IDENTIFIER)('File')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_CONSTANT
PsiElement(STRING_LITERAL)('"$gantHome/lib"')
PsiElement(RPAR)(')')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('files')
PsiElement(DOT)('.')
CALL_EXPRESSION
CALL_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('each')
PsiElement(IDENTIFIER)('classpath')
PsiWhiteSpace(' ')
VALUE_ARGUMENT_LIST
FUNCTION_LITERAL
PsiElement(LPAR)('(')
PsiElement(LBRACE)('{')
VALUE_ARGUMENT
PsiWhiteSpace('\n ')
STRING_CONSTANT
BODY
PsiElement(STRING_LITERAL)('"$libs/groovy-..."')
CALL_EXPRESSION
PsiElement(RPAR)(')')
REFERENCE_EXPRESSION
PsiWhiteSpace('\n ')
PsiElement(IDENTIFIER)('classpath')
PsiElement(RBRACE)('}')
VALUE_ARGUMENT_LIST
PsiWhiteSpace('\n\n ')
PsiElement(LPAR)('(')
PROPERTY
VALUE_ARGUMENT
MODIFIER_LIST
REFERENCE_EXPRESSION
ATTRIBUTE_ANNOTATION
PsiElement(IDENTIFIER)('it')
PsiElement(LBRACKET)('[')
PsiElement(RPAR)(')')
ATTRIBUTE
PsiWhiteSpace('\n ')
TYPE_REFERENCE
PsiElement(RBRACE)('}')
USER_TYPE
PsiWhiteSpace('\n ')
REFERENCE_EXPRESSION
PsiElement(RBRACE)('}')
PsiElement(IDENTIFIER)('lazy')
PsiWhiteSpace('\n\n ')
PsiElement(RBRACKET)(']')
PROPERTY
MODIFIER_LIST
ATTRIBUTE_ANNOTATION
PsiElement(LBRACKET)('[')
ATTRIBUTE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('JPS')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('module')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(val)('val')
PsiElement(LBRACE)('{')
PsiWhiteSpace(' ')
PsiWhiteSpace('\n ')
PsiElement(IDENTIFIER)('gant')
BODY
PsiWhiteSpace(' ')
BINARY_EXPRESSION
PsiElement(EQ)('=')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('targetLevel')
CALL_EXPRESSION
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('library')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
STRING_CONSTANT
PsiElement(LBRACE)('{')
PsiElement(STRING_LITERAL)('"1.5"')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n ')
CALL_EXPRESSION
BODY
REFERENCE_EXPRESSION
DOT_QUALIFIED_EXPRESSION
PsiElement(IDENTIFIER)('classpath')
DOT_QUALIFIED_EXPRESSION
VALUE_ARGUMENT_LIST
NEW
PsiElement(LPAR)('(')
PsiElement(new)('new')
VALUE_ARGUMENT
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('File')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_CONSTANT
PsiElement(STRING_LITERAL)('"$gantHome/lib"')
PsiElement(RPAR)(')')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('antLayout')
PsiElement(IDENTIFIER)('files')
PsiElement(COMMA)(',')
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
CALL_EXPRESSION
VALUE_ARGUMENT
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('gant')
PsiElement(IDENTIFIER)('each')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
VALUE_ARGUMENT
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
BODY
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('classpath')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('it')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
ATTRIBUTE_ANNOTATION
PsiElement(LBRACKET)('[')
ATTRIBUTE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('groovy')
PsiElement(IDENTIFIER)('lazy')
PsiElement(RPAR)(')')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('JPS')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('module')
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n ')
CALL_EXPRESSION
BODY
REFERENCE_EXPRESSION
BINARY_EXPRESSION
PsiElement(IDENTIFIER)('src')
REFERENCE_EXPRESSION
VALUE_ARGUMENT_LIST
PsiElement(IDENTIFIER)('targetLevel')
PsiElement(LPAR)('(')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
OPERATION_REFERENCE
STRING_CONSTANT
PsiElement(EQ)('=')
PsiElement(STRING_LITERAL)('"$projectHome/antLayout/src"')
PsiWhiteSpace(' ')
PsiElement(RPAR)(')')
STRING_CONSTANT
PsiWhiteSpace('\n ')
PsiElement(STRING_LITERAL)('"1.5"')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n\n')
CALL_EXPRESSION
PsiElement(RBRACE)('}')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('classpath')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('antLayout')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('gant')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('groovy')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('src')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_CONSTANT
PsiElement(STRING_LITERAL)('"$projectHome/antLayout/src"')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PsiElement(RBRACE)('}')
PsiElement(DOT)('.')
PsiElement(DOT)('.')
CALL_EXPRESSION
CALL_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
...
...
idea/testData/psi/examples/PolymorphicClassObjects.txt
浏览文件 @
efd417e0
...
@@ -135,63 +135,64 @@ JetFile: PolymorphicClassObjects.jet
...
@@ -135,63 +135,64 @@ JetFile: PolymorphicClassObjects.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
DELEGATION_SPECIFIER_LIST
PsiWhiteSpace(' ')
DELEGATOR_SUPER_CLASS
DELEGATION_SPECIFIER_LIST
TYPE_REFERENCE
DELEGATOR_SUPER_CLASS
USER_TYPE
TYPE_REFERENCE
REFERENCE_EXPRESSION
USER_TYPE
PsiElement(IDENTIFIER)('Buildable')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Buildable')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n ')
PsiElement(LBRACE)('{')
FUN
PsiWhiteSpace('\n ')
MODIFIER_LIST
FUN
PsiElement(override)('override')
MODIFIER_LIST
PsiWhiteSpace(' ')
PsiElement(override)('override')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('newBuilder')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('E')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
TYPE_PARAMETER
PsiElement(fun)('fun')
PsiElement(IDENTIFIER)('R')
PsiWhiteSpace(' ')
PsiElement(GT)('>')
PsiElement(IDENTIFIER)('newBuilder')
VALUE_PARAMETER_LIST
TYPE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(LT)('<')
PsiElement(RPAR)(')')
TYPE_PARAMETER
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('E')
PsiElement(COLON)(':')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
TYPE_REFERENCE
TYPE_PARAMETER
USER_TYPE
PsiElement(IDENTIFIER)('R')
REFERENCE_EXPRESSION
PsiElement(GT)('>')
PsiElement(IDENTIFIER)('Builder')
VALUE_PARAMETER_LIST
TYPE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(LT)('<')
PsiElement(RPAR)(')')
TYPE_PROJECTION
PsiWhiteSpace(' ')
TYPE_REFERENCE
PsiElement(COLON)(':')
USER_TYPE
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
TYPE_REFERENCE
PsiElement(IDENTIFIER)('E')
USER_TYPE
PsiElement(COMMA)(',')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Builder')
TYPE_PROJECTION
TYPE_ARGUMENT_LIST
TYPE_REFERENCE
PsiElement(LT)('<')
USER_TYPE
TYPE_PROJECTION
REFERENCE_EXPRESSION
TYPE_REFERENCE
PsiElement(IDENTIFIER)('R')
USER_TYPE
PsiElement(GT)('>')
REFERENCE_EXPRESSION
PsiWhiteSpace('\n\n ')
PsiElement(IDENTIFIER)('E')
PsiElement(RBRACE)('}')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('R')
PsiElement(GT)('>')
PsiWhiteSpace('\n\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PsiWhiteSpace('\n\n')
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PsiWhiteSpace('\n\n')
...
...
idea/testData/psi/examples/UpdateOperation.txt
浏览文件 @
efd417e0
...
@@ -37,90 +37,91 @@ JetFile: UpdateOperation.jet
...
@@ -37,90 +37,91 @@ JetFile: UpdateOperation.jet
PsiElement(class)('class')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n ')
PsiElement(LBRACE)('{')
FUN
PsiWhiteSpace('\n ')
PsiElement(fun)('fun')
FUN
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiElement(IDENTIFIER)('copy')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('from')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Pair')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('copy')
PsiElement(IDENTIFIER)('x')
VALUE_PARAMETER_LIST
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
PsiElement(COLON)(':')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('from')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Pair')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
TYPE_REFERENCE
VALUE_PARAMETER
USER_TYPE
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(IDENTIFIER)('from')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
PsiElement(EQ)('=')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('x')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
VALUE_PARAMETER
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('y')
PsiElement(IDENTIFIER)('from')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
PsiElement(COLON)(':')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
TYPE_REFERENCE
PsiElement(COMMA)(',')
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('from')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('y')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
VALUE_PARAMETER
PsiElement(EQ)('=')
PsiElement(IDENTIFIER)('y
')
PsiWhiteSpace('
')
PsiWhiteSpace(' ')
NEW
PsiElement(
COLON)(':
')
PsiElement(
new)('new
')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
TYPE_REFERENCE
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(IDENTIFIER)('Pair')
PsiWhiteSpace(' ')
VALUE_ARGUMENT_LIST
PsiElement(EQ)('=')
PsiElement(LPAR)('(')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('x')
PsiElement(IDENTIFIER)('from')
PsiElement(COMMA)(',')
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
VALUE_ARGUMENT
PsiElement(IDENTIFIER)('y')
REFERENCE_EXPRESSION
PsiElement(RPAR)(')')
PsiElement(IDENTIFIER)('y')
PsiWhiteSpace(' ')
PsiElement(RPAR)(')')
PsiElement(EQ)('=')
PsiWhiteSpace('\n ')
PsiWhiteSpace(' ')
PsiElement(RBRACE)('}')
NEW
PsiElement(new)('new')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Pair')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('x')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('y')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PsiWhiteSpace('\n\n')
...
...
idea/testData/psi/examples/collections/ArrayList.txt
浏览文件 @
efd417e0
此差异已折叠。
点击以展开。
idea/testData/psi/examples/collections/List.txt
浏览文件 @
efd417e0
...
@@ -225,116 +225,117 @@ JetFile: List.jet
...
@@ -225,116 +225,117 @@ JetFile: List.jet
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_LITERAL
PsiElement(object)('object')
OBJECT_DECLARATION
PsiWhiteSpace(' ')
PsiElement(object)('object')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
DELEGATION_SPECIFIER_LIST
PsiWhiteSpace(' ')
DELEGATOR_SUPER_CALL
DELEGATION_SPECIFIER_LIST
TYPE_REFERENCE
DELEGATOR_SUPER_CALL
USER_TYPE
TYPE_REFERENCE
REFERENCE_EXPRESSION
USER_TYPE
PsiElement(IDENTIFIER)('IIterator')
REFERENCE_EXPRESSION
VALUE_ARGUMENT_LIST
PsiElement(IDENTIFIER)('IIterator')
PsiElement(LPAR)('(')
VALUE_ARGUMENT_LIST
PsiElement(RPAR)(')')
PsiElement(LPAR)('(')
PsiWhiteSpace(' ')
PsiElement(RPAR)(')')
CLASS_BODY
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
CLASS_BODY
PsiWhiteSpace('\n ')
PsiElement(LBRACE)('{')
PROPERTY
PsiWhiteSpace('\n ')
MODIFIER_LIST
PROPERTY
PsiElement(private)('private')
MODIFIER_LIST
PsiWhiteSpace(' ')
PsiElement(private)('private')
PsiElement(var)('var')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(var)('var')
PsiElement(IDENTIFIER)('current')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('current')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('List')
PsiElement(DOT)('.')
THIS_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(this)('this')
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
PsiElement(override)('override')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('hasNext')
PsiWhiteSpace('\n ')
PROPERTY_ACCESSOR
PsiElement(get)('get')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
BINARY
_EXPRESSION
DOT_QUALIFIED
_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('current')
PsiElement(IDENTIFIER)('List')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
OPERATION_REFERENCE
THIS_EXPRESSION
PsiElement(EQEQ)('==')
REFERENCE_EXPRESSION
PsiWhiteSpace(' ')
PsiElement(this)('this')
REFERENCE_EXPRESSION
PsiWhiteSpace('\n\n ')
PsiElement(IDENTIFIER)('Nil')
PROPERTY
PsiWhiteSpace('\n\n ')
MODIFIER_LIST
FUN
PsiElement(override)('override')
MODIFIER_LIST
PsiWhiteSpace(' ')
PsiElement(override)('override')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiElement(IDENTIFIER)('hasNext')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('next')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n ')
PROPERTY
PROPERTY
_ACCESSOR
PsiElement(
val)('val
')
PsiElement(
get)('get
')
Psi
WhiteSpace('
')
Psi
Element(LPAR)('(
')
PsiElement(
IDENTIFIER)('result
')
PsiElement(
RPAR)(')
')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
DOT_QUALIFIED
_EXPRESSION
BINARY
_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('current')
PsiElement(IDENTIFIER)('current')
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(EQEQ)('==')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('value')
PsiElement(IDENTIFIER)('Nil')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n\n ')
BINARY_EXPRESSION
FUN
REFERENCE_EXPRESSION
MODIFIER_LIST
PsiElement(IDENTIFIER)('current')
PsiElement(override)('override')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('next')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('result')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('current')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('value')
PsiWhiteSpace('\n ')
BINARY_EXPRESSION
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('current')
PsiElement(IDENTIFIER)('current')
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('current')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('tail')
PsiWhiteSpace('\n ')
RETURN
PsiElement(return)('return')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('tail')
PsiElement(IDENTIFIER)('result')
PsiWhiteSpace('\n ')
PsiWhiteSpace('\n ')
RETURN
PsiElement(RBRACE)('}')
PsiElement(return)('return')
PsiWhiteSpace('\n ')
PsiWhiteSpace(' ')
PsiElement(RBRACE)('}')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('result')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录