Import syntax fixed
This commit is contained in:
@@ -15,7 +15,7 @@ namespaceHeader
|
|||||||
;
|
;
|
||||||
|
|
||||||
import
|
import
|
||||||
: "import" SimpleName{"."} ("." "*" | "as" SimpleName)?
|
: "import" ("namespace" ".")? SimpleName{"."} ("." "*" | "as" SimpleName)? SEMI?
|
||||||
;
|
;
|
||||||
|
|
||||||
toplevelObject
|
toplevelObject
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* import
|
* import
|
||||||
* : "import" SimpleName{"."} ("." "*" | "as" SimpleName)?
|
* : "import" ("namespace" ".")? SimpleName{"."} ("." "*" | "as" SimpleName)? SEMI?
|
||||||
* ;
|
* ;
|
||||||
*/
|
*/
|
||||||
private void parseImportDirective() {
|
private void parseImportDirective() {
|
||||||
@@ -154,26 +154,31 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
PsiBuilder.Marker importDirective = mark();
|
PsiBuilder.Marker importDirective = mark();
|
||||||
advance(); // IMPORT_KEYWORD
|
advance(); // IMPORT_KEYWORD
|
||||||
|
|
||||||
expect(IDENTIFIER, "Expecting qualified name", TokenSet.create(DOT, MAP));
|
|
||||||
while (at(DOT)) {
|
PsiBuilder.Marker reference = mark();
|
||||||
advance(); // DOT
|
|
||||||
if (at(IDENTIFIER)) {
|
if (at(NAMESPACE_KEYWORD)) {
|
||||||
advance(); // IDENTIFIER
|
advance(); // NAMESPACE_KEYWORD
|
||||||
}
|
expect(DOT, "Expecting '.'", TokenSet.create(IDENTIFIER, MUL, SEMICOLON));
|
||||||
else if (at(MUL)) {
|
|
||||||
advance(); // MUL
|
|
||||||
handleUselessRename();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
errorWithRecovery("Qualified name must be a '.'-separated identifier list", TokenSet.create(AS_KEYWORD, DOT, MAP, SEMICOLON));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (at(MAP)) {
|
|
||||||
advance(); // MAP
|
expect(IDENTIFIER, "Expecting qualified name", TokenSet.create(DOT, AS_KEYWORD));
|
||||||
|
while (at(DOT) && lookahead(1) != MUL) {
|
||||||
|
PsiBuilder.Marker precede = reference.precede();
|
||||||
|
reference.done(REFERENCE_EXPRESSION);
|
||||||
|
reference = precede;
|
||||||
|
advance(); // DOT
|
||||||
|
expect(IDENTIFIER, "Qualified name must be a '.'-separated identifier list", TokenSet.create(AS_KEYWORD, DOT, SEMICOLON));
|
||||||
|
}
|
||||||
|
reference.done(REFERENCE_EXPRESSION);
|
||||||
|
|
||||||
|
if (at(DOT)) {
|
||||||
|
advance(); // DOT
|
||||||
|
assert _at(MUL);
|
||||||
|
advance(); // MUL
|
||||||
handleUselessRename();
|
handleUselessRename();
|
||||||
}
|
}
|
||||||
else if (at(AS_KEYWORD)) {
|
if (at(AS_KEYWORD)) {
|
||||||
advance(); // AS_KEYWORD
|
advance(); // AS_KEYWORD
|
||||||
expect(IDENTIFIER, "Expecting identifier", TokenSet.create(SEMICOLON));
|
expect(IDENTIFIER, "Expecting identifier", TokenSet.create(SEMICOLON));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.psi.tree.IElementType;
|
import com.intellij.psi.tree.IElementType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,23 +20,13 @@ public class JetImportDirective extends JetElement {
|
|||||||
visitor.visitImportDirective(this);
|
visitor.visitImportDirective(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@Nullable @IfNotParsed
|
||||||
public String getImportedName() {
|
public JetReferenceExpression getImportedName() {
|
||||||
StringBuilder answer = new StringBuilder();
|
return (JetReferenceExpression) findChildByType(JetNodeTypes.REFERENCE_EXPRESSION);
|
||||||
ASTNode childNode = getNode().getFirstChildNode();
|
|
||||||
while (childNode != null) {
|
|
||||||
IElementType tt = childNode.getElementType();
|
|
||||||
if (tt == JetTokens.MAP || tt == JetTokens.AS_KEYWORD) break;
|
|
||||||
if (tt == JetTokens.IDENTIFIER || tt == JetTokens.DOT) {
|
|
||||||
answer.append(childNode.getText());
|
|
||||||
}
|
|
||||||
childNode = childNode.getTreeNext();
|
|
||||||
}
|
|
||||||
return answer.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private ASTNode getAliasNameNode() {
|
public ASTNode getAliasNameNode() {
|
||||||
boolean asPassed = false;
|
boolean asPassed = false;
|
||||||
ASTNode childNode = getNode().getFirstChildNode();
|
ASTNode childNode = getNode().getFirstChildNode();
|
||||||
while (childNode != null) {
|
while (childNode != null) {
|
||||||
@@ -60,6 +51,6 @@ public class JetImportDirective extends JetElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAllUnder() {
|
public boolean isAllUnder() {
|
||||||
return getNode().findChildByType(JetTokens.MAP) != null;
|
return getNode().findChildByType(JetTokens.MUL) != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,10 @@ public class JetReferenceExpression extends JetExpression {
|
|||||||
return findChildByClass(JetReferenceExpression.class);
|
return findChildByClass(JetReferenceExpression.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable @IfNotParsed
|
||||||
public String getReferencedName() {
|
public String getReferencedName() {
|
||||||
return getNode().findChildByType(REFERENCE_TOKENS).getText();
|
ASTNode node = getNode().findChildByType(REFERENCE_TOKENS);
|
||||||
|
return node == null ? null : node.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -47,6 +49,7 @@ public class JetReferenceExpression extends JetExpression {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiReference getReference() {
|
public PsiReference getReference() {
|
||||||
|
if (getReferencedName() == null) return null;
|
||||||
return new PsiReference() {
|
return new PsiReference() {
|
||||||
@Override
|
@Override
|
||||||
public PsiElement getElement() {
|
public PsiElement getElement() {
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}?
|
|||||||
<YYINITIAL> "||" { return JetTokens.OROR ; }
|
<YYINITIAL> "||" { return JetTokens.OROR ; }
|
||||||
<YYINITIAL> "?." { return JetTokens.SAFE_ACCESS;}
|
<YYINITIAL> "?." { return JetTokens.SAFE_ACCESS;}
|
||||||
<YYINITIAL> "?:" { return JetTokens.ELVIS ; }
|
<YYINITIAL> "?:" { return JetTokens.ELVIS ; }
|
||||||
<YYINITIAL> ".*" { return JetTokens.MAP ; }
|
//<YYINITIAL> ".*" { return JetTokens.MAP ; }
|
||||||
<YYINITIAL> ".?" { return JetTokens.FILTER ; }
|
//<YYINITIAL> ".?" { return JetTokens.FILTER ; }
|
||||||
<YYINITIAL> "*=" { return JetTokens.MULTEQ ; }
|
<YYINITIAL> "*=" { return JetTokens.MULTEQ ; }
|
||||||
<YYINITIAL> "/=" { return JetTokens.DIVEQ ; }
|
<YYINITIAL> "/=" { return JetTokens.DIVEQ ; }
|
||||||
<YYINITIAL> "%=" { return JetTokens.PERCEQ ; }
|
<YYINITIAL> "%=" { return JetTokens.PERCEQ ; }
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ public interface JetTokens {
|
|||||||
JetToken OROR = new JetToken("OROR");
|
JetToken OROR = new JetToken("OROR");
|
||||||
JetToken SAFE_ACCESS = new JetToken("SAFE_ACCESS");
|
JetToken SAFE_ACCESS = new JetToken("SAFE_ACCESS");
|
||||||
JetToken ELVIS = new JetToken("ELVIS");
|
JetToken ELVIS = new JetToken("ELVIS");
|
||||||
JetToken MAP = new JetToken("MAP");
|
// JetToken MAP = new JetToken("MAP");
|
||||||
JetToken FILTER = new JetToken("FILTER");
|
// JetToken FILTER = new JetToken("FILTER");
|
||||||
JetToken QUEST = new JetToken("QUEST");
|
JetToken QUEST = new JetToken("QUEST");
|
||||||
JetToken COLON = new JetToken("COLON");
|
JetToken COLON = new JetToken("COLON");
|
||||||
JetToken SEMICOLON = new JetToken("SEMICOLON");
|
JetToken SEMICOLON = new JetToken("SEMICOLON");
|
||||||
@@ -160,6 +160,8 @@ public interface JetTokens {
|
|||||||
|
|
||||||
TokenSet OPERATIONS = TokenSet.create(AS_KEYWORD, IS_KEYWORD, IN_KEYWORD, DOT, PLUSPLUS, MINUSMINUS, MUL, PLUS,
|
TokenSet OPERATIONS = TokenSet.create(AS_KEYWORD, IS_KEYWORD, IN_KEYWORD, DOT, PLUSPLUS, MINUSMINUS, MUL, PLUS,
|
||||||
MINUS, EXCL, DIV, PERC, LT, GT, LTEQ, GTEQ, EQEQEQ, ARROW, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR,
|
MINUS, EXCL, DIV, PERC, LT, GT, LTEQ, GTEQ, EQEQEQ, ARROW, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR,
|
||||||
SAFE_ACCESS, ELVIS, MAP, FILTER, QUEST, COLON, SEMICOLON, RANGE, EQ, MULTEQ, DIVEQ, PERCEQ, PLUSEQ, MINUSEQ,
|
SAFE_ACCESS, ELVIS,
|
||||||
|
// MAP, FILTER,
|
||||||
|
QUEST, COLON, SEMICOLON, RANGE, EQ, MULTEQ, DIVEQ, PERCEQ, PLUSEQ, MINUSEQ,
|
||||||
NOT_IN, NOT_IS, HASH, IDENTIFIER, LABEL_IDENTIFIER, ATAT, AT);
|
NOT_IN, NOT_IS, HASH, IDENTIFIER, LABEL_IDENTIFIER, ATAT, AT);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -15,4 +15,5 @@ JetFile: FileStart_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
@@ -3,13 +3,17 @@ JetFile: ImportSoftKW.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('import')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('import')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(IDENTIFIER)('import')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
namespace foo.bar.goo
|
namespace foo.bar.goo
|
||||||
|
|
||||||
|
import namespace.foo
|
||||||
import foo
|
import foo
|
||||||
import foo.bar
|
import foo.bar
|
||||||
import foo as bar
|
import foo as bar
|
||||||
|
|||||||
@@ -12,19 +12,31 @@ JetFile: Imports.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(namespace)('namespace')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
IMPORT_DIRECTIVE
|
||||||
|
PsiElement(import)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -33,9 +45,11 @@ JetFile: Imports.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -44,13 +58,16 @@ JetFile: Imports.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(MAP)('.*')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(MUL)('*')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(MUL)('*')
|
PsiElement(MUL)('*')
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace foo.bar.goo
|
namespace foo.bar.goo
|
||||||
|
|
||||||
|
import namespace ;
|
||||||
|
import namespace.*
|
||||||
|
import namespace. ;
|
||||||
|
|
||||||
import foo as
|
import foo as
|
||||||
import foo.
|
import foo.
|
||||||
import foo.bar.
|
import foo.bar.
|
||||||
|
|||||||
@@ -12,7 +12,38 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(namespace)('namespace')
|
||||||
|
PsiErrorElement:Expecting '.'
|
||||||
|
<empty list>
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiErrorElement:Expecting qualified name
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
IMPORT_DIRECTIVE
|
||||||
|
PsiElement(import)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(namespace)('namespace')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting qualified name
|
||||||
|
PsiElement(MUL)('*')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
IMPORT_DIRECTIVE
|
||||||
|
PsiElement(import)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(namespace)('namespace')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiErrorElement:Expecting qualified name
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
IMPORT_DIRECTIVE
|
||||||
|
PsiElement(import)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
@@ -26,12 +57,15 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace('\n')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiErrorElement:Expecting namespace or top level declaration
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
@@ -47,10 +81,13 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -60,10 +97,13 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -82,32 +122,39 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
PsiElement(IDENTIFIER)('foo')
|
||||||
<empty list>
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
||||||
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
PsiElement(DOT)('.')
|
||||||
<empty list>
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
||||||
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
PsiElement(IDENTIFIER)('foo')
|
||||||
<empty list>
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
||||||
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -118,10 +165,13 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -133,10 +183,13 @@ JetFile: Imports_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ JetFile: NamespaceBlock.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -30,10 +31,13 @@ JetFile: NamespaceBlock.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
CLASS
|
CLASS
|
||||||
@@ -133,6 +137,7 @@ JetFile: NamespaceBlock.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('sdf')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('sdf')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
@@ -12,7 +12,8 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
@@ -26,12 +27,15 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace('\n')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiErrorElement:Expecting namespace or top level declaration
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
@@ -56,10 +60,13 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -69,10 +76,13 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -91,32 +101,39 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
PsiElement(IDENTIFIER)('foo')
|
||||||
<empty list>
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
||||||
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
PsiElement(DOT)('.')
|
||||||
<empty list>
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
||||||
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
REFERENCE_EXPRESSION
|
||||||
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
PsiElement(IDENTIFIER)('foo')
|
||||||
<empty list>
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Qualified name must be a '.'-separated identifier list
|
||||||
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -127,10 +144,13 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -142,10 +162,13 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(MAP)('.*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiErrorElement:Cannot rename a all imported items to one identifier
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
@@ -266,6 +289,7 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('sdf')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('sdf')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
@@ -12,7 +12,8 @@ JetFile: SoftKeywords.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
CLASS
|
CLASS
|
||||||
MODIFIER_LIST
|
MODIFIER_LIST
|
||||||
|
|||||||
Reference in New Issue
Block a user