From cfe1f3cb239263e1d2e064f6dfc6ec4300553464 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Mon, 5 Jan 2015 19:02:39 -0500 Subject: [PATCH] contrib/jwrapper: search for more extern classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/jwrapper/src/types.nit | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/contrib/jwrapper/src/types.nit b/contrib/jwrapper/src/types.nit index 53d95b7..4fb5251 100644 --- a/contrib/jwrapper/src/types.nit +++ b/contrib/jwrapper/src/types.nit @@ -174,12 +174,11 @@ class JavaType # Search inside `lib/android` directory for already wrapped classes # If found, contains the class identifier and the Nit Module name - var find_extern_class: nullable Couple[String, NitModule] = find_extern_class_fun is lazy + var find_extern_class: nullable Couple[String, NitModule] is lazy do - private fun find_extern_class_fun: nullable Couple[String, NitModule] - do - var regex = "extern class Native[a-zA-Z1-9]\\\+[ ]\\\+in[ ]\\\+\"Java\"[ ]*`\{[ ]*" + self.to_s + "\\\+[ ]*`\}" - var grep = new IProcess("grep", "-r", regex, "{"NIT_DIR".environ}/lib/android/") + var regex = "extern class [a-zA-Z1-9]\\\+[ ]\\\+in[ ]\\\+\"Java\"[ ]*`\{[ ]*" + self.to_s + "\\\+[ ]*`\}" + var nit_dir = "NIT_DIR".environ + var grep = new IProcess("grep", "-r", regex, nit_dir/"lib/android/", nit_dir/"lib/java/") var to_eat = ["private", "extern", "class"] var output = grep.read_line -- 1.7.9.5