From 71c2a25dc51d9d1b9b407959cc6f237918c9fe49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Thu, 23 Jul 2015 17:50:10 -0400 Subject: [PATCH] contrib/jwrapper: add some top-level methods to the reserved keywords MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/jwrapper/src/code_generator.nit | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/jwrapper/src/code_generator.nit b/contrib/jwrapper/src/code_generator.nit index f164bca..0d93ffa 100644 --- a/contrib/jwrapper/src/code_generator.nit +++ b/contrib/jwrapper/src/code_generator.nit @@ -272,11 +272,17 @@ redef class Sys # List of Nit keywords # # These may also be keywords in Java, but there they would be used capitalized. - private var nit_keywords: Array[String] = ["abort", "abstract", "and", "assert", + private var nit_keywords = new HashSet[String].from(["abort", "abstract", "and", "assert", "break", "class", "continue", "do", "else", "end", "enum", "extern", "false", "implies", "import", "init", "interface", "intrude", "if", "in", "is", "isa", "isset", "for", "label", "loop", "module", "new", "not", "null", "nullable", "or", "package", "private", - "protected", "public", "return", "self", "super", "then", "true", "type", "var", "while"] + "protected", "public", "return", "self", "super", "then", "true", "type", "var", "while", + + # Top-level methods + "class_name", "get_time", "hash", "is_same_type", "is_same_instance", "output", + + # Pointer or JavaObject methods + "free"]) end redef class String -- 1.7.9.5