Parser nimmt name statt simplename für Typ

This commit is contained in:
JanUlrich 2014-08-07 12:20:11 +02:00
parent 92408cfdcc
commit b9dde7b015
7 changed files with 1298 additions and 1313 deletions

View File

@ -788,19 +788,7 @@ classbodydeclaration : classmemberdeclaration
}
//*/
typename : simplename
{
$$=$1;
}
| IDENTIFIER '.' typename
{
UsedId UI = new UsedId($1.getOffset());
UI.set_Name( $1.getLexem() + "." + $3 );
UI.setOffset($1.getOffset());//hinzugef<65>gt hoth: 07.04.2006
$$ = UI;
}
classorinterfacetype : simplename parameter
classorinterfacetype : name parameter
{
if ($2 != null) {
//$1.set_ParaList($2.get_ParaList());
@ -1254,12 +1242,6 @@ type : primitivetype
{
$$=$1;
}
/*
| referencelongtype
{
$$=$1;
}
*/
|referencetype '[' ']'
{
$1.setArray(true);

File diff suppressed because it is too large Load Diff

View File

@ -788,19 +788,7 @@ classbodydeclaration : classmemberdeclaration
}
//*/
typename : simplename
{
$$=$1;
}
| IDENTIFIER '.' typename
{
UsedId UI = new UsedId($1.getOffset());
UI.set_Name( $1.getLexem() + "." + $3 );
UI.setOffset($1.getOffset());//hinzugef<65>gt hoth: 07.04.2006
$$ = UI;
}
classorinterfacetype : simplename parameter
classorinterfacetype : name parameter
{
if ($2 != null) {
//$1.set_ParaList($2.get_ParaList());
@ -1254,12 +1242,6 @@ type : primitivetype
{
$$=$1;
}
/*
| referencelongtype
{
$$=$1;
}
*/
|referencetype '[' ']'
{
$1.setArray(true);

View File

@ -0,0 +1,9 @@
class ConstructorTest1{}
class ConstructorTest2{
var;
void method(){
var = new ConstructorTest1();
}
}

View File

@ -0,0 +1,16 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class LambdaTest17 {
private static final String TEST_FILE = "LambdaTest17.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("A a");
MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain);
}
}

View File

@ -0,0 +1,6 @@
class Test{
java.lang.Integer var;
var2 = var;
}

View File

@ -0,0 +1,16 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class LambdaTest18 {
private static final String TEST_FILE = "LambdaTest18.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
mustContain.add("java.lang.Integer var2");
MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain);
}
}