From 7a33eb532cd89f3038f97bb05b9ebe8b66d0e5f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 1 Sep 2015 10:48:11 -0400 Subject: [PATCH] contrib/objcwrapper: prefix remaining entities by `Objc` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/objcwrapper/src/objc_generator.nit | 2 +- contrib/objcwrapper/src/objc_model.nit | 10 +++++----- contrib/objcwrapper/src/objc_visitor.nit | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/objcwrapper/src/objc_generator.nit b/contrib/objcwrapper/src/objc_generator.nit index 845a3b1..65b2f44 100644 --- a/contrib/objcwrapper/src/objc_generator.nit +++ b/contrib/objcwrapper/src/objc_generator.nit @@ -307,7 +307,7 @@ redef class Text end end -redef class Property +redef class ObjcProperty private fun comment_str: String do if is_commented then return "#" else return "" diff --git a/contrib/objcwrapper/src/objc_model.nit b/contrib/objcwrapper/src/objc_model.nit index a082d22..26a4df6 100644 --- a/contrib/objcwrapper/src/objc_model.nit +++ b/contrib/objcwrapper/src/objc_model.nit @@ -65,13 +65,13 @@ end # Method of an `ObjcClass` class ObjcMethod - super Property + super ObjcProperty # Scope: '+' for a static class method, and '-' for an instance method var scope: Char is noinit, writable # Parameters of the method - var params = new Array[Param] + var params = new Array[ObjcParam] # Return type as a `String` var return_type: String is noinit, writable @@ -82,7 +82,7 @@ end # Attribute of an `ObjcClass` class ObjcAttribute - super Property + super ObjcProperty # Name of this attribute var name: String is noinit, writable @@ -92,13 +92,13 @@ class ObjcAttribute end # Property of an `ObjcClass` -class Property +class ObjcProperty # Is this property to be commented out? var is_commented = false is writable end # Parameter of an `ObjcMethod` -class Param +class ObjcParam # Parameter name, used by the caller (e.g. `withObject` in `withObject: (NSObject*) obj`) var name: String is noinit, writable diff --git a/contrib/objcwrapper/src/objc_visitor.nit b/contrib/objcwrapper/src/objc_visitor.nit index 487713d..3657b6c 100644 --- a/contrib/objcwrapper/src/objc_visitor.nit +++ b/contrib/objcwrapper/src/objc_visitor.nit @@ -85,7 +85,7 @@ redef class Nsignature_block_signature method.is_commented = true # Use a placeholder for easier debugging - param = new Param + param = new ObjcParam param.name = "UNKNOWN" param.return_type = "UNKNOWN" param.variable_name = "UNKNOWN" @@ -157,14 +157,14 @@ end redef class Nparameter # Return null if type is not yet unsupported - private fun to_param: nullable Param do return null + private fun to_param: nullable ObjcParam do return null end # Parameters with both a public and an internal name redef class Nparameter_named redef fun to_param do - var param = new Param + var param = new ObjcParam param.variable_name = n_right.collect_text param.name = n_left.collect_text @@ -181,7 +181,7 @@ end redef class Nparameter_single redef fun to_param do - var param = new Param + var param = new ObjcParam param.name = n_term.collect_text param.is_single = true return param -- 1.7.9.5