Skip to content
Snippets Groups Projects
Commit 5eef8a7f authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

Fixed duplicate generation of names in python

parent 3f2e9cd3
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ aspect Python_CodeGenEnv { ...@@ -7,7 +7,7 @@ aspect Python_CodeGenEnv {
public class Python_env { public class Python_env {
final private class Python_printer { final private class Python_printer {
private boolean newline = true; private boolean newline = true;
private PrintStream out; private PrintStream out;
...@@ -99,7 +99,7 @@ aspect Python_CodeGen { ...@@ -99,7 +99,7 @@ aspect Python_CodeGen {
} }
aspect PythonTypes { aspect PythonTypes {
public void Specification.Python_genTypes(Python_env env) { public void Specification.Python_genTypes(Python_env env) {
for (int i = 0 ; i < getNumDecl() ; i++) { for (int i = 0 ; i < getNumDecl() ; i++) {
getDecl(i).Python_genSignatureAndTypedef(env); getDecl(i).Python_genSignatureAndTypedef(env);
...@@ -107,8 +107,8 @@ aspect PythonTypes { ...@@ -107,8 +107,8 @@ aspect PythonTypes {
} }
public void Decl.Python_genSignatureAndTypedef(Python_env env) { public void Decl.Python_genSignatureAndTypedef(Python_env env) {
throw new Error(this.getClass().getName() + throw new Error(this.getClass().getName() +
".Python_genSignatureAndTypedef(Python_env env)" + ".Python_genSignatureAndTypedef(Python_env env)" +
" not declared"); " not declared");
} }
...@@ -151,9 +151,9 @@ aspect PythonTypes { ...@@ -151,9 +151,9 @@ aspect PythonTypes {
} }
public void TypeInstance.Python_genIntentions(Python_env env) { public void TypeInstance.Python_genIntentions(Python_env env) {
env.print("{'':'"+getName()+"'"); env.print("{");
for(Intention i : sortedIntentions()) { for(Intention i : sortedIntentions()) {
env.print(", '"+i.getKey()+"':'"+new String(i.getValue())+"'"); env.print("'"+i.getKey()+"':'"+new String(i.getValue())+"', ");
} }
env.print("}"); env.print("}");
} }
...@@ -167,8 +167,8 @@ aspect PythonTypes { ...@@ -167,8 +167,8 @@ aspect PythonTypes {
} }
public void DataType.Python_genSignature(Python_env env) { public void DataType.Python_genSignature(Python_env env) {
throw new Error(this.getClass().getName() + throw new Error(this.getClass().getName() +
".Python_genSignature(Python_env env)" + ".Python_genSignature(Python_env env)" +
" not declared"); " not declared");
} }
...@@ -227,8 +227,8 @@ aspect PythonTypes { ...@@ -227,8 +227,8 @@ aspect PythonTypes {
} }
public void DataType.Python_genTypedef(Python_env env) { public void DataType.Python_genTypedef(Python_env env) {
throw new Error(this.getClass().getName() + throw new Error(this.getClass().getName() +
".Python_genTypedef(Python_env env)" + ".Python_genTypedef(Python_env env)" +
" not declared"); " not declared");
} }
...@@ -297,8 +297,8 @@ aspect PythonTypes { ...@@ -297,8 +297,8 @@ aspect PythonTypes {
} }
public String Exp.Python_getValue() { public String Exp.Python_getValue() {
throw new Error(this.getClass().getName() + throw new Error(this.getClass().getName() +
".Python_getValue()" + ".Python_getValue()" +
" not declared"); " not declared");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment