/** * Writes out a node to a SourceWriter and returns the resulting script * * @param node * @return */ public String writeToString(Expression node) { SourceWriter sw = new SourceWriter(runtimeModel); node.write(sw); return sw.getSource(); }
/** * Writes out a node to a SourceWriter and returns the resulting script * * @param node * @return */ public String writeToString(Expression node) { SourceWriter sw = new SourceWriter(runtimeModel); node.write(sw); return sw.getSource(); }
private String createRuntimeSource(RuntimeModel model, String baseClassName, boolean scriptInDocs) { if (scriptInDocs) { throw new RuntimeException("Do no know how to clean the block comments yet"); } SourceWriter writer = new SourceWriter(model); writer.setScript(stripComments(theScript)); writer.setBaseClassName(baseClassName); scriptModel.write(writer); return writer.getSource(); }
private String createRuntimeSource(RuntimeModel model, String baseClassName, boolean scriptInDocs) { if (scriptInDocs) { throw new RuntimeException("Do no know how to clean the block comments yet"); } SourceWriter writer = new SourceWriter(model); writer.setScript(stripComments(theScript)); writer.setBaseClassName(baseClassName); scriptModel.write(writer); return writer.getSource(); }
SourceWriter writer = new SourceWriter(model); script.write(writer);