Empty expression removed (wasn't brightest idea anyway).
This commit is contained in:
@@ -108,7 +108,6 @@ public interface JetNodeTypes {
|
||||
JetNodeType DOT_QIALIFIED_EXPRESSION = new JetNodeType("DOT_QIALIFIED_EXPRESSION", JetDotQualifiedExpression.class);
|
||||
JetNodeType HASH_QIALIFIED_EXPRESSION = new JetNodeType("HASH_QIALIFIED_EXPRESSION", JetHashQualifiedExpression.class);
|
||||
JetNodeType SAFE_ACCESS_EXPRESSION = new JetNodeType("SAFE_ACCESS_EXPRESSION", JetSafeQualifiedExpression.class);
|
||||
JetNodeType EMPTY_EXPRESSION = new JetNodeType("EMPTY_EXPRESSION", JetEmptyExpression.class);
|
||||
JetNodeType MATCH_BLOCK = new JetNodeType("MATCH_BLOCK", JetMatchBlock.class);
|
||||
JetNodeType MATCH_ENTRY = new JetNodeType("MATCH_ENTRY");
|
||||
JetNodeType PATTERN = new JetNodeType("PATTERN");
|
||||
|
||||
@@ -856,12 +856,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
*/
|
||||
private void parseControlStructureBody() {
|
||||
PsiBuilder.Marker body = mark();
|
||||
if (at(SEMICOLON)) {
|
||||
PsiBuilder.Marker mark = mark();
|
||||
advance();
|
||||
mark.done(EMPTY_EXPRESSION);
|
||||
}
|
||||
else {
|
||||
if (!at(SEMICOLON)) {
|
||||
parseExpression();
|
||||
}
|
||||
body.done(BODY);
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class JetEmptyExpression extends JetExpression {
|
||||
public JetEmptyExpression(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(JetVisitor visitor) {
|
||||
visitor.visitEmptyExpression(this);
|
||||
}
|
||||
}
|
||||
@@ -325,8 +325,4 @@ public class JetVisitor extends PsiElementVisitor {
|
||||
public void visitMatchBlock(JetMatchBlock block) {
|
||||
visitJetElement(block);
|
||||
}
|
||||
|
||||
public void visitEmptyExpression(JetEmptyExpression expression) {
|
||||
visitExpression(expression);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class JetWhileExpression extends JetExpression {
|
||||
return findExpressionUnder(JetNodeTypes.CONDITION);
|
||||
}
|
||||
|
||||
@Nullable @IfNotParsed
|
||||
@Nullable
|
||||
public JetExpression getBody() {
|
||||
return findExpressionUnder(JetNodeTypes.BODY);
|
||||
}
|
||||
|
||||
@@ -642,8 +642,8 @@ JetFile: ControlStructures.jet
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
BODY
|
||||
EMPTY_EXPRESSION
|
||||
PsiElement(SEMICOLON)(';')
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
@@ -707,8 +707,8 @@ JetFile: ControlStructures.jet
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
BODY
|
||||
EMPTY_EXPRESSION
|
||||
PsiElement(SEMICOLON)(';')
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
|
||||
Reference in New Issue
Block a user