r1596 - branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/script
Author: tchemit Date: 2009-10-26 03:36:35 +0100 (Mon, 26 Oct 2009) New Revision: 1596 Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/script/ScriptManager.java Log: remove commented unused code Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/script/ScriptManager.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/script/ScriptManager.java 2009-10-25 19:49:15 UTC (rev 1595) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/script/ScriptManager.java 2009-10-26 02:36:35 UTC (rev 1596) @@ -49,7 +49,6 @@ script = trimScript(script); StringBuffer result = new StringBuffer(); JavaParser p = new JavaParser(new StringReader(script)); - //JavaParser p = new JavaParser(new StringReader(script + ";")); while (!p.Line()) { SimpleNode node = p.popNode(); if (node != null) { @@ -186,7 +185,6 @@ } compiler.appendBodyCode(modifiers + " " + node.getText().substring(0, node.getText().length() - 1) + code + "}"); - //compiler.bodyCode.append(";\n"); } private void scanScriptNode(SimpleNode node) throws CompilerException { @@ -239,7 +237,6 @@ } } compiler.appendBodyCode(node.getText()); - //compiler.bodyCode.append(";\n"); compiler.addScriptMethod(new MethodDescriptor(name, Modifier.PUBLIC, returnType, parameterTypes.toArray(new String[parameterTypes.size()]), compiler.getClassLoader())); } else if (nodeType == JavaParserTreeConstants.JJTCLASSORINTERFACEDECLARATION || nodeType == JavaParserTreeConstants.JJTINITIALIZER) { @@ -248,7 +245,6 @@ str += ";"; } compiler.appendBodyCode(str); - //compiler.bodyCode.append(";\n"); } else if (nodeType == JavaParserTreeConstants.JJTCONSTRUCTORDECLARATION) { processConstructor(node.getChild(0).getChild(0).getText(), node.getChild(0).getChild(1)); } else if (nodeType == JavaParserTreeConstants.JJTLOCALVARIABLEDECLARATION || nodeType == JavaParserTreeConstants.JJTFIELDDECLARATION) { @@ -276,7 +272,6 @@ String type = TagManager.resolveClassName(className, compiler); compiler.addScriptField(new FieldDescriptor(name, Modifier.PUBLIC, type, compiler.getClassLoader())); // TODO: determine the actual modifiers if (equals != -1 && !isFinal && !isStatic) { // declare the field in the class body, but wait to actually initialize it - //compiler.bodyCode.append(text.substring(0, equals).trim()); compiler.appendBodyCode(text.substring(0, equals).trim() + ";"); String initializer = text.substring(equals + 1).trim(); if (type.endsWith("[]")) { @@ -294,7 +289,6 @@ compiler.appendBodyCode(text); } compiler.appendBodyCode("\n"); - //compiler.bodyCode.append(";\n"); } else { String text = node.getText().trim(); if (text.length() > 0) { @@ -302,14 +296,12 @@ text += ";"; } compiler.appendInitializerCode(text); - //compiler.initializer.append(";\n"); } } } public void registerScript(String script) throws CompilerException { JavaParser p = new JavaParser(new StringReader(script)); - //JavaParser p = new JavaParser(new StringReader(script + ";")); while (!p.Line()) { SimpleNode node = p.popNode(); if (node != null) {
participants (1)
-
tchemit@users.nuiton.org