From 682ca927475c87808aa9c45f7983c24c815171c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 28 Jul 2015 08:37:22 -0400 Subject: [PATCH] contrib/jwrapper: accept [] (and anything) in search for existing wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/jwrapper/src/model.nit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/jwrapper/src/model.nit b/contrib/jwrapper/src/model.nit index 656d092..011d0a8 100644 --- a/contrib/jwrapper/src/model.nit +++ b/contrib/jwrapper/src/model.nit @@ -321,16 +321,16 @@ redef class Sys grep.wait # Sort out the modules, Nit class names and Java types - var regex = """(.+):\\s*extern +class +([a-zA-Z0-9_]+) *in *"Java" *`\\{ *([a-zA-Z0-9.$/]+) *`\\}""".to_re + var regex = """(.+):\\s*extern +class +([a-zA-Z0-9_]+) *in *"Java" *`\\{(.+)`\\}""".to_re for line in lines do var matches = line.search_all(regex) for match in matches do var path = match[1].to_s var nit_name = match[2].to_s - var java_name = match[3].to_s + var java_name = match[3].to_s.trim # Debug code - # print "+ Found {nit_name}:{java_name} at {path}" + # print "+ Found {nit_name}: {java_name} at {path}" var mod = modules.get_or_null(path) if mod == null then -- 1.7.9.5