You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/05/07 21:13:49 UTC

[2/3] lucy-clownfish git commit: Rename 'micro_sym' and 'macro_sym' to 'name'

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/50575077/compiler/src/CFCTestParser.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestParser.c b/compiler/src/CFCTestParser.c
index 622dfff..097b1e5 100644
--- a/compiler/src/CFCTestParser.c
+++ b/compiler/src/CFCTestParser.c
@@ -76,7 +76,7 @@ S_run_tests(CFCTest *test) {
             const char *specifier = specifiers[i];
             char *src = CFCUtil_sprintf("int32_t %s;", specifier);
             CFCVariable *var = CFCTest_parse_variable(test, parser, src);
-            STR_EQ(test, CFCVariable_micro_sym(var), specifier,
+            STR_EQ(test, CFCVariable_get_name(var), specifier,
                    "identifier/declarator: %s", specifier);
             FREEMEM(src);
             CFCBase_decref((CFCBase*)var);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/50575077/compiler/src/CFCTestSymbol.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestSymbol.c b/compiler/src/CFCTestSymbol.c
index fe1fbc3..f9f8c76 100644
--- a/compiler/src/CFCTestSymbol.c
+++ b/compiler/src/CFCTestSymbol.c
@@ -127,7 +127,7 @@ S_run_tests(CFCTest *test) {
         CFCSymbol *booga
             = CFCSymbol_new(parcel, "parcel", NULL, NULL, "booga");
         int equal = CFCSymbol_equals(ooga, booga);
-        OK(test, !equal, "different micro_sym spoils equals");
+        OK(test, !equal, "different name spoils equals");
         CFCBase_decref((CFCBase*)ooga);
         CFCBase_decref((CFCBase*)booga);
     }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/50575077/compiler/src/CFCVariable.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCVariable.c b/compiler/src/CFCVariable.c
index 61cd087..534f0a7 100644
--- a/compiler/src/CFCVariable.c
+++ b/compiler/src/CFCVariable.c
@@ -50,16 +50,16 @@ S_generate_c_strings(CFCVariable *self);
 CFCVariable*
 CFCVariable_new(struct CFCParcel *parcel, const char *exposure,
                 const char *class_name, const char *class_nickname,
-                const char *micro_sym, struct CFCType *type, int inert) {
+                const char *name, struct CFCType *type, int inert) {
     CFCVariable *self = (CFCVariable*)CFCBase_allocate(&CFCVARIABLE_META);
     return CFCVariable_init(self, parcel, exposure, class_name, class_nickname,
-                            micro_sym, type, inert);
+                            name, type, inert);
 }
 
 CFCVariable*
 CFCVariable_init(CFCVariable *self, struct CFCParcel *parcel,
                  const char *exposure, const char *class_name,
-                 const char *class_nickname, const char *micro_sym,
+                 const char *class_nickname, const char *name,
                  struct CFCType *type, int inert) {
     // Validate params.
     CFCUTIL_NULL_CHECK(type);
@@ -68,7 +68,7 @@ CFCVariable_init(CFCVariable *self, struct CFCParcel *parcel,
     const char *real_exposure = exposure ? exposure : "local";
 
     CFCSymbol_init((CFCSymbol*)self, parcel, real_exposure, class_name,
-                   class_nickname, micro_sym);
+                   class_nickname, name);
 
     // Assign type, inert.
     self->type = (CFCType*)CFCBase_incref((CFCBase*)type);
@@ -111,8 +111,8 @@ S_generate_c_strings(CFCVariable *self) {
        ) {
         postfix = CFCType_get_array(self->type);
     }
-    const char *micro_sym = CFCVariable_micro_sym(self);
-    self->local_c = CFCUtil_sprintf("%s %s%s", type_str, micro_sym, postfix);
+    const char *name = CFCVariable_get_name(self);
+    self->local_c = CFCUtil_sprintf("%s %s%s", type_str, name, postfix);
     self->local_dec = CFCUtil_sprintf("%s;", self->local_c);
     const char *full_sym = CFCVariable_full_sym(self);
     self->global_c = CFCUtil_sprintf("%s %s%s", type_str, full_sym, postfix);
@@ -147,8 +147,8 @@ CFCVariable_local_declaration(CFCVariable *self) {
 }
 
 const char*
-CFCVariable_micro_sym(CFCVariable *self) {
-    return CFCSymbol_micro_sym((CFCSymbol*)self);
+CFCVariable_get_name(CFCVariable *self) {
+    return CFCSymbol_get_name((CFCSymbol*)self);
 }
 
 const char*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/50575077/compiler/src/CFCVariable.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCVariable.h b/compiler/src/CFCVariable.h
index 671bf67..d86d273 100644
--- a/compiler/src/CFCVariable.h
+++ b/compiler/src/CFCVariable.h
@@ -19,8 +19,8 @@
 
 /** Clownfish::CFC::Model::Variable - A Clownfish variable.
  *
- * A variable, having a L<Type|Clownfish::CFC::Model::Type>, a micro_sym (i.e.
- * name), an exposure, and optionally, a location in the global namespace
+ * A variable, having a L<Type|Clownfish::CFC::Model::Type>, a name,
+ * an exposure, and optionally, a location in the global namespace
  * hierarchy.
  *
  * Variable objects which exist only within a local scope, e.g. those within
@@ -40,7 +40,7 @@ struct CFCType;
 
 /**
  * @param type A Clownfish::CFC::Model::Type.
- * @param micro_sym The variable's name, without any namespacing prefixes.
+ * @param name The variable's name, without any namespacing prefixes.
  * @param exposure See Clownfish::CFC::Model::Symbol.
  * @param class_name See Clownfish::CFC::Model::Symbol.
  * @param class_nickname See Clownfish::CFC::Model::Symbol.
@@ -48,12 +48,12 @@ struct CFCType;
 CFCVariable*
 CFCVariable_new(struct CFCParcel *parcel, const char *exposure,
                 const char *class_name, const char *class_nickname,
-                const char *micro_sym, struct CFCType *type, int inert);
+                const char *name, struct CFCType *type, int inert);
 
 CFCVariable*
 CFCVariable_init(CFCVariable *self, struct CFCParcel *parcel,
                  const char *exposure, const char *class_name,
-                 const char *class_nickname, const char *micro_sym,
+                 const char *class_nickname, const char *name,
                  struct CFCType *type, int inert);
 
 void
@@ -73,7 +73,7 @@ CFCVariable_inert(CFCVariable *self);
 
 
 /** Returns a string with the Variable's C type and its
- * `micro_sym`. For instance:
+ * `name`. For instance:
  *
  *     int32_t average_lifespan
  */
@@ -98,7 +98,7 @@ const char*
 CFCVariable_local_declaration(CFCVariable *self);
 
 const char*
-CFCVariable_micro_sym(CFCVariable *self);
+CFCVariable_get_name(CFCVariable *self);
 
 const char*
 CFCVariable_short_sym(CFCVariable *self);