From 835551985804504c5bed5dbb863ecdd1d0f2a41a Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Sat, 11 Dec 2010 11:19:53 +0100 Subject: [PATCH] fix for multiple catch clauses, weird: is list() special in ST? --- CSharpTranslator/antlr3/src/cs2j/CSharp/JavaPrettyPrint.g | 2 +- .../antlr3/src/cs2j/bin/Debug/templates/java.stg | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CSharpTranslator/antlr3/src/cs2j/CSharp/JavaPrettyPrint.g b/CSharpTranslator/antlr3/src/cs2j/CSharp/JavaPrettyPrint.g index 63ea0ac..ee27365 100644 --- a/CSharpTranslator/antlr3/src/cs2j/CSharp/JavaPrettyPrint.g +++ b/CSharpTranslator/antlr3/src/cs2j/CSharp/JavaPrettyPrint.g @@ -1257,7 +1257,7 @@ goto_statement: | 'case' constant_expression | 'default') ';' ; catch_clauses: - c+=catch_clause+ -> list(items={ $c }, sep = { "\n" }) ; + c+=catch_clause+ -> seplist(items={ $c }, sep = { "\n" }) ; catch_clause: ^('catch' type identifier block) -> catch_template(type = { $type.st }, id = { $identifier.st }, block = {$block.st}, blocksemi = { $block.isSemi }, blockbraces = { !$block.isSemi } ); finally_clause: diff --git a/CSharpTranslator/antlr3/src/cs2j/bin/Debug/templates/java.stg b/CSharpTranslator/antlr3/src/cs2j/bin/Debug/templates/java.stg index ca0211e..3c7982e 100644 --- a/CSharpTranslator/antlr3/src/cs2j/bin/Debug/templates/java.stg +++ b/CSharpTranslator/antlr3/src/cs2j/bin/Debug/templates/java.stg @@ -244,7 +244,13 @@ parameter(annotation,param) ::= "/* */ " inline_comment(payload, explanation) ::= "/* */" commalist(items) ::= "" dotlist(items) ::= "" -list(items,sep) ::= "" +//list(items,sep) ::= "" +list(items,sep) ::= << + +>> +seplist(items,sep) ::= << + +>> unsupported(reason, text) ::= "/* [UNSUPPORTED] \"\" */"