From 2b273a00cba5b397c433d9663e3aa4b5f5405407 Mon Sep 17 00:00:00 2001 From: Anders Nilsson <anders.nilsson@cs.lth.se> Date: Mon, 4 Dec 2006 23:20:02 +0100 Subject: [PATCH] Added prettyprinting of attributes --- CompilerGeneration.jrag | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CompilerGeneration.jrag b/CompilerGeneration.jrag index 3f51003..180daf8 100644 --- a/CompilerGeneration.jrag +++ b/CompilerGeneration.jrag @@ -135,6 +135,11 @@ aspect GenPrettyPrinter { pStream.println(" getElement(i).prettyPrint(indent,pStream);"); pStream.println(" }"); pStream.println(" }\n"); + pStream.println(" syn String Attribute.id() = \"\";"); + pStream.println(" eq RdfId.id() = \"Rdf:ID\";"); + pStream.println(" public void Attribute.prettyPrint(String indent, PrintStream pStream) {"); + pStream.println(" System.out.print(\" \"+id()+\"=\"+getValue().getSTRING_LITERAL());"); + pStream.println(" }\n"); super.genPrettyPrinter(pStream); pStream.println("}\n"); } -- GitLab