mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-123111 (qualified super parsing fixed)
This commit is contained in:
+2
@@ -60,6 +60,8 @@ PsiJavaFile:QualifiedSuperMethodCall1.java
|
||||
<empty list>
|
||||
PsiIdentifier:d('d')
|
||||
PsiJavaToken:DOT('.')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiKeyword:super('super')
|
||||
PsiExpressionList
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
|
||||
+3
-1
@@ -6,9 +6,11 @@ PsiJavaFile:QualifiedSuperMethodCall1.java
|
||||
<empty list>
|
||||
PsiIdentifier:d('d')
|
||||
PsiJavaToken:DOT('.')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiKeyword:super('super')
|
||||
PsiExpressionList
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiLiteralExpression:0
|
||||
PsiJavaToken:INTEGER_LITERAL('0')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
@@ -0,0 +1,19 @@
|
||||
PsiJavaFile:QualifiedSuperMethodCall3.java
|
||||
PsiMethodCallExpression:C.A.super()
|
||||
PsiReferenceExpression:C.A.super
|
||||
PsiReferenceExpression:C.A
|
||||
PsiReferenceExpression:C
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiIdentifier:C('C')
|
||||
PsiJavaToken:DOT('.')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiIdentifier:A('A')
|
||||
PsiJavaToken:DOT('.')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiKeyword:super('super')
|
||||
PsiExpressionList
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,6 @@ package com.intellij.lang.java.parser.partial;
|
||||
import com.intellij.lang.PsiBuilder;
|
||||
import com.intellij.lang.java.parser.JavaParser;
|
||||
import com.intellij.lang.java.parser.JavaParsingTestCase;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
public class ExpressionParserTest extends JavaParsingTestCase {
|
||||
public ExpressionParserTest() {
|
||||
@@ -112,6 +111,7 @@ public class ExpressionParserTest extends JavaParsingTestCase {
|
||||
public void testQualifiedSuperMethodCall0() { doParserTest("new D().super(0)"); }
|
||||
public void testQualifiedSuperMethodCall1() { doParserTest("d.super(0)"); }
|
||||
public void testQualifiedSuperMethodCall2() { doParserTest("(new O()).<T>super()"); }
|
||||
public void testQualifiedSuperMethodCall3() { doParserTest("C.A.super()"); }
|
||||
public void testSuperMethodCallTypeParameterList() { doParserTest("super()"); }
|
||||
public void testPrimitiveClassObjectAccess() { doParserTest("int.class"); }
|
||||
public void testPrimitiveFieldAccess() { doParserTest("int.x"); }
|
||||
@@ -149,9 +149,10 @@ public class ExpressionParserTest extends JavaParsingTestCase {
|
||||
public void testLambdaExpression19() { doParserTest("(@A T t) -> (null)"); }
|
||||
public void testAmbiguousLambdaExpression() { doParserTest("f( (x) < y , z > (w) -> v )"); }
|
||||
|
||||
private void doParserTest(@NonNls final String text) {
|
||||
private void doParserTest(String text) {
|
||||
doParserTest(text, new MyTestParser());
|
||||
}
|
||||
|
||||
private static class MyTestParser implements TestParser {
|
||||
@Override
|
||||
public void parse(final PsiBuilder builder) {
|
||||
|
||||
Reference in New Issue
Block a user