contrib/jwrapper: find extern classes with underscore in their names
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 24 Jul 2015 13:10:03 +0000 (09:10 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 24 Jul 2015 19:45:57 +0000 (15:45 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/jwrapper/src/model.nit

index 0f406b0..8d6da40 100644 (file)
@@ -280,7 +280,7 @@ redef class Sys
                if lib_paths.is_empty then return map
 
                # Use grep to find all extern classes implemented in Java
-               var grep_regex = "extern class [a-zA-Z0-9]\\\+[ ]\\\+in[ ]\\\+\"Java\""
+               var grep_regex = "extern class [a-zA-Z0-9_]\\\+[ ]\\\+in[ ]\\\+\"Java\""
                var grep_args = ["-r", "--with-filename", grep_regex]
                grep_args.add_all lib_paths
 
@@ -290,7 +290,7 @@ 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" *`\\{ *([a-zA-Z0-9.$/]+) *`\\}""".to_re
                for line in lines do
                        var matches = line.search_all(regex)
                        for match in matches do