Skip to content
Snippets Groups Projects
Commit 0e644339 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Recognize forbidden classnames and prepend '_':s before generating Java classes.

parent cd211fe9
No related branches found
No related tags found
No related merge requests found
......@@ -382,16 +382,21 @@ aspect Misc {
return false;
}
static final String[] ASTNode.forbiddenNames = {"Attribute",
"to"};
static String ASTNode.fixName(String s) {
if (s.equals("class")) {
return "clazz";
}
if (Arrays.binarySearch(forbiddenNames,s) > -1) {
s = "_" + s;
}
s = s.replace("-","_");
return s;
}
}
aspect GenAspects {
public void Start.genAspects(PrintStream pStream) {
pStream.println("/* -*-Java-*- */");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment