From 5c1015b51ec25f4eef1aba581c3c2dec92a9c027 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Fri, 6 Dec 2019 12:57:07 +0100 Subject: [PATCH] modified: src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java - fieldType = TypePlaceholder.fresh(fieldDeclarationContext.getStart()); + fieldType = TypePlaceholder.fresh(fieldDeclarationContext.variableDeclaratorList().getStart()); //PL 2019-12-06: variableDeclaratorList() eingefuegt, um als Token nicht die Modifier zu bekommen --- .../parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java | 2 +- src/test/resources/bytecode/javFiles/Fac.jav | 2 +- src/test/resources/bytecode/javFiles/Field.jav | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java index 140b3432..6f1300dc 100644 --- a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java +++ b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java @@ -359,7 +359,7 @@ public class SyntaxTreeGenerator{ && fieldDeclarationContext.unannTypeOrAuto().unannType() != null){ fieldType = TypeGenerator.convert(fieldDeclarationContext.unannTypeOrAuto().unannType(), reg, generics); }else{ - fieldType = TypePlaceholder.fresh(fieldDeclarationContext.getStart()); + fieldType = TypePlaceholder.fresh(fieldDeclarationContext.variableDeclaratorList().getStart()); //PL 2019-12-06: variableDeclaratorList() eingefuegt, um als Token nicht die Modifier zu bekommen } for(Java8Parser.VariableDeclaratorContext varCtx : fieldDeclarationContext.variableDeclaratorList().variableDeclarator()){ String fieldName = convert(varCtx.variableDeclaratorId()); diff --git a/src/test/resources/bytecode/javFiles/Fac.jav b/src/test/resources/bytecode/javFiles/Fac.jav index 28650b45..bde593d4 100644 --- a/src/test/resources/bytecode/javFiles/Fac.jav +++ b/src/test/resources/bytecode/javFiles/Fac.jav @@ -3,7 +3,7 @@ import java.lang.Integer; public class Fac { - getFac(n){ + getFac(java.lang.Integer n){ var res = 1; var i = 1; while(i<=n) { diff --git a/src/test/resources/bytecode/javFiles/Field.jav b/src/test/resources/bytecode/javFiles/Field.jav index b19b2308..0fd1133f 100644 --- a/src/test/resources/bytecode/javFiles/Field.jav +++ b/src/test/resources/bytecode/javFiles/Field.jav @@ -1,7 +1,7 @@ import java.lang.Integer; public class Field { - public Integer x = 5; + public x = 5; m(){ return x;