lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [1/6] git commit: refs/heads/move-dumpable - Remove class "attributes" from Clownfish.
Date Fri, 26 Jul 2013 01:30:41 GMT
Updated Branches:
  refs/heads/move-dumpable [created] d294f1e5b


Remove class "attributes" from Clownfish.

Remove the "attributes" misfeature from Clownfish, now that we don't
need it to support "dumpable" any more.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d294f1e5
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d294f1e5
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d294f1e5

Branch: refs/heads/move-dumpable
Commit: d294f1e5bf08b876e10893b2673c723758634cc1
Parents: 251d2bc
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Thu Jul 25 18:22:22 2013 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Thu Jul 25 18:27:24 2013 -0700

----------------------------------------------------------------------
 clownfish/compiler/perl/lib/Clownfish.pod    |  7 +-
 clownfish/compiler/perl/lib/Clownfish/CFC.xs | 17 -----
 clownfish/compiler/perl/t/401-class.t        |  9 +--
 clownfish/compiler/src/CFCClass.c            | 44 ------------
 clownfish/compiler/src/CFCClass.h            | 11 ---
 clownfish/compiler/src/CFCLexHeader.c        | 85 +++++++++++------------
 clownfish/compiler/src/CFCLexHeader.h        |  2 +-
 clownfish/compiler/src/CFCLexHeader.l        |  1 -
 clownfish/compiler/src/CFCParseHeader.y      |  6 --
 clownfish/compiler/src/CFCTestClass.c        | 12 +---
 10 files changed, 46 insertions(+), 148 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/perl/lib/Clownfish.pod
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/lib/Clownfish.pod b/clownfish/compiler/perl/lib/Clownfish.pod
index d9a8e58..6e86f9e 100644
--- a/clownfish/compiler/perl/lib/Clownfish.pod
+++ b/clownfish/compiler/perl/lib/Clownfish.pod
@@ -101,8 +101,7 @@ Boat_capsize() is a function, Boat_Capsize() is a method.
 
 =head2 Class declaration syntax
 
-    [final] [inert] class CLASSNAME [cnick CNICK] 
-        [inherits PARENT] [ : ATTRIBUTE ]* {
+    [final] [inert] class CLASSNAME [cnick CNICK] [inherits PARENT] {
     
         [declarations]
     
@@ -129,10 +128,6 @@ prefix for every function and method.
 
 =item * B<PARENT> - The full name of the parent class.
 
-=item * B<ATTRIBUTE> - An arbitrary attribute, e.g. "dumpable", or perhaps
-"serializable".  A class may have multiple attributes, each preceded by a
-colon.
-
 =back
 
 =head2 Memory management

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/perl/lib/Clownfish/CFC.xs
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/lib/Clownfish/CFC.xs b/clownfish/compiler/perl/lib/Clownfish/CFC.xs
index 205d191..415f863 100644
--- a/clownfish/compiler/perl/lib/Clownfish/CFC.xs
+++ b/clownfish/compiler/perl/lib/Clownfish/CFC.xs
@@ -228,23 +228,6 @@ PPCODE:
     CFCClass_add_method(self, method);
 
 void
-add_attribute(self, name, value_sv)
-    CFCClass *self;
-    const char *name;
-    SV *value_sv;
-PPCODE:
-    char *value = SvOK(value_sv) ? SvPV_nolen(value_sv) : NULL;
-    CFCClass_add_attribute(self, name, value);
-
-int
-has_attribute(self, name)
-    CFCClass *self;
-    const char *name;
-CODE:
-    RETVAL = CFCClass_has_attribute(self, name);
-OUTPUT: RETVAL
-
-void
 grow_tree(self)
     CFCClass *self;
 PPCODE:

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/perl/t/401-class.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/401-class.t b/clownfish/compiler/perl/t/401-class.t
index c92d545..f6eac88 100644
--- a/clownfish/compiler/perl/t/401-class.t
+++ b/clownfish/compiler/perl/t/401-class.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 56;
+use Test::More tests => 53;
 use Clownfish::CFC::Model::Class;
 use Clownfish::CFC::Parser;
 
@@ -81,9 +81,7 @@ my $foo_jr = Clownfish::CFC::Model::Class->create(
     class_name        => 'Foo::FooJr',
     parent_class_name => 'Foo',
 );
-$foo_jr->add_attribute( dumpable => 1 );
 
-ok( $foo_jr->has_attribute('dumpable'), 'has_attribute' );
 is( $foo_jr->get_struct_sym,  'FooJr',       "struct_sym" );
 is( $foo_jr->full_struct_sym, 'neato_FooJr', "full_struct_sym" );
 
@@ -98,7 +96,6 @@ my $final_foo = Clownfish::CFC::Model::Class->create(
     file_spec         => $file_spec,
     final             => 1,
 );
-$final_foo->add_attribute( dumpable => 1 );
 ok( $final_foo->final, "final" );
 is( $final_foo->include_h, 'Foo/FooJr.h', "inlude_h uses path_part" );
 is( $final_foo->get_parent_class_name, 'Foo::FooJr',
@@ -182,7 +179,7 @@ $class_content = q|
      *
      * Wow wow wow.
      */
-    public class Animal::Dog inherits Animal : lovable : drooly {
+    public class Animal::Dog inherits Animal {
         public inert Dog* init(Dog *self, CharBuf *name, CharBuf *fave_food);
         inert uint32_t count();
         inert uint64_t num_dogs;
@@ -233,8 +230,6 @@ for my $method ( @{ $class->methods } ) {
 }
 is( ( scalar grep { $_->public } @{ $class->methods } ),
     6, "pass acl to Method constructor" );
-ok( $class->has_attribute('lovable'), "parsed class attribute" );
-ok( $class->has_attribute('drooly'),  "parsed second class attribute" );
 
 $class_content = qq|
     inert class Rigor::Mortis cnick Mort {

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCClass.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCClass.c b/clownfish/compiler/src/CFCClass.c
index 7b3fa5a..c2d5a2b 100644
--- a/clownfish/compiler/src/CFCClass.c
+++ b/clownfish/compiler/src/CFCClass.c
@@ -34,11 +34,6 @@
 #include "CFCVariable.h"
 #include "CFCFileSpec.h"
 
-typedef struct CFCClassAttribute {
-    char *name;
-    char *value;
-} CFCClassAttribute;
-
 typedef struct CFCClassRegEntry {
     char *key;
     struct CFCClass *klass;
@@ -67,8 +62,6 @@ struct CFCClass {
     size_t num_member_vars;
     CFCVariable **inert_vars;
     size_t num_inert_vars;
-    CFCClassAttribute **attributes;
-    size_t num_attributes;
     CFCFileSpec *file_spec;
     char *parent_class_name;
     int is_final;
@@ -146,8 +139,6 @@ CFCClass_do_create(CFCClass *self, struct CFCParcel *parcel,
     self->num_member_vars = 0;
     self->inert_vars      = (CFCVariable**)CALLOCATE(1, sizeof(CFCVariable*));
     self->num_inert_vars  = 0;
-    self->attributes      = (CFCClassAttribute**)CALLOCATE(1, sizeof(CFCClassAttribute*));
-    self->num_attributes  = 0;
     self->parent_class_name = CFCUtil_strdup(parent_class_name);
     self->docucomment
         = (CFCDocuComment*)CFCBase_incref((CFCBase*)docucomment);
@@ -233,19 +224,12 @@ CFCClass_destroy(CFCClass *self) {
     for (size_t i = 0; self->inert_vars[i] != NULL; i++) {
         CFCBase_decref((CFCBase*)self->inert_vars[i]);
     }
-    for (size_t i = 0; self->attributes[i] != NULL; i++) {
-        CFCClassAttribute *attribute = self->attributes[i];
-        FREEMEM(attribute->name);
-        FREEMEM(attribute->value);
-        FREEMEM(attribute);
-    }
     CFCBase_decref((CFCBase*)self->file_spec);
     FREEMEM(self->children);
     FREEMEM(self->functions);
     FREEMEM(self->methods);
     FREEMEM(self->member_vars);
     FREEMEM(self->inert_vars);
-    FREEMEM(self->attributes);
     FREEMEM(self->parent_class_name);
     FREEMEM(self->struct_sym);
     FREEMEM(self->ivars_struct);
@@ -439,34 +423,6 @@ CFCClass_add_inert_var(CFCClass *self, CFCVariable *var) {
     self->inert_vars[self->num_inert_vars] = NULL;
 }
 
-void
-CFCClass_add_attribute(CFCClass *self, const char *name, const char *value) {
-    if (!name || !strlen(name)) { CFCUtil_die("'name' is required"); }
-    if (CFCClass_has_attribute(self, name)) {
-        CFCUtil_die("Attribute '%s' already registered", name);
-    }
-    CFCClassAttribute *attribute
-        = (CFCClassAttribute*)MALLOCATE(sizeof(CFCClassAttribute));
-    attribute->name  = CFCUtil_strdup(name);
-    attribute->value = CFCUtil_strdup(value);
-    self->num_attributes++;
-    size_t size = (self->num_attributes + 1) * sizeof(CFCClassAttribute*);
-    self->attributes = (CFCClassAttribute**)REALLOCATE(self->attributes, size);
-    self->attributes[self->num_attributes - 1] = attribute;
-    self->attributes[self->num_attributes] = NULL;
-}
-
-int
-CFCClass_has_attribute(CFCClass *self, const char *name) {
-    CFCUTIL_NULL_CHECK(name);
-    for (size_t i = 0; i < self->num_attributes; i++) {
-        if (strcmp(name, self->attributes[i]->name) == 0) {
-            return true;
-        }
-    }
-    return false;
-}
-
 #define MAX_FUNC_LEN 128
 
 static CFCFunction*

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCClass.h
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCClass.h b/clownfish/compiler/src/CFCClass.h
index a26c9c3..5c52728 100644
--- a/clownfish/compiler/src/CFCClass.h
+++ b/clownfish/compiler/src/CFCClass.h
@@ -117,17 +117,6 @@ CFCClass_add_member_var(CFCClass *self, struct CFCVariable *var);
 void
 CFCClass_add_inert_var(CFCClass *self, struct CFCVariable *var);
 
-/** Add an arbitrary attribute to the class.
- */
-void
-CFCClass_add_attribute(CFCClass *self, const char *name, const char *value);
-
-/** Returns true if the Class object has the supplied attribute, false
- * otherwise.
- */
-int
-CFCClass_has_attribute(CFCClass *self, const char *name);
-
 /* Return the inert Function object for the supplied sym, if any.
  */
 struct CFCFunction*

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCLexHeader.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCLexHeader.c b/clownfish/compiler/src/CFCLexHeader.c
index 7ea1c76..b4362a8 100644
--- a/clownfish/compiler/src/CFCLexHeader.c
+++ b/clownfish/compiler/src/CFCLexHeader.c
@@ -377,8 +377,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 28
-#define YY_END_OF_BUFFER 29
+#define YY_NUM_RULES 27
+#define YY_END_OF_BUFFER 28
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -388,14 +388,14 @@ struct yy_trans_info
 	};
 static yyconst flex_int16_t yy_accept[76] =
     {   0,
-        0,    0,    0,    0,   29,   27,   26,   26,   27,    7,
-        8,    2,   10,   27,   27,   27,   16,   16,   12,   11,
-       13,   18,    5,    6,   18,    3,    4,   22,   22,   23,
-        0,   17,    0,   16,   16,    0,    0,    0,    0,    1,
-       18,   18,   22,   23,    9,    0,    0,   15,   14,   18,
-        0,   23,    0,    0,    0,   25,   18,    0,   25,    0,
-        0,   24,    0,    0,   18,    0,   24,   24,   19,    0,
-        0,    0,   21,   20,    0
+        0,    0,    0,    0,   28,   26,   25,   25,   26,    7,
+        8,    2,   10,   26,   26,   26,   15,   15,   26,   11,
+       12,   17,    5,    6,   17,    3,    4,   21,   21,   22,
+        0,   16,    0,   15,   15,    0,    0,    0,    0,    1,
+       17,   17,   21,   22,    9,    0,    0,   14,   13,   17,
+        0,   22,    0,    0,    0,   24,   17,    0,   24,    0,
+        0,   23,    0,    0,   17,    0,   23,   23,   18,    0,
+        0,    0,   20,   19,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -508,10 +508,10 @@ static yyconst flex_int16_t yy_chk[162] =
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[29] =
+static yyconst flex_int32_t yy_rule_can_match_eol[28] =
     {   0,
-0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 
-    0, 1, 1, 0, 1, 1, 1, 0, 0,     };
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 
+    1, 1, 0, 1, 1, 1, 0, 0,     };
 
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
@@ -941,49 +941,50 @@ YY_RULE_SETUP
 case 12:
 YY_RULE_SETUP
 #line 111 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_COLON); }
+{ PARSE(CFC_TOKENTYPE_EQUALS); }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 112 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_EQUALS); }
+#line 113 "../src/CFCLexHeader.l"
+{ PARSE(CFC_TOKENTYPE_HEX_LITERAL); }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 114 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_HEX_LITERAL); }
+{ PARSE(CFC_TOKENTYPE_FLOAT_LITERAL); }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 115 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_FLOAT_LITERAL); }
+{ PARSE(CFC_TOKENTYPE_INTEGER_LITERAL); }
 	YY_BREAK
 case 16:
+/* rule 16 can match eol */
 YY_RULE_SETUP
 #line 116 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_INTEGER_LITERAL); }
+{ PARSE(CFC_TOKENTYPE_STRING_LITERAL); }
 	YY_BREAK
 case 17:
-/* rule 17 can match eol */
 YY_RULE_SETUP
-#line 117 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_STRING_LITERAL); }
+#line 118 "../src/CFCLexHeader.l"
+{ PARSE(S_identifier_or_keyword(yytext)); }
 	YY_BREAK
 case 18:
+/* rule 18 can match eol */
 YY_RULE_SETUP
-#line 119 "../src/CFCLexHeader.l"
-{ PARSE(S_identifier_or_keyword(yytext)); }
+#line 120 "../src/CFCLexHeader.l"
+{ BEGIN(CBLOCK);  PARSE(CFC_TOKENTYPE_CBLOCK_START); }
 	YY_BREAK
 case 19:
-/* rule 19 can match eol */
 YY_RULE_SETUP
 #line 121 "../src/CFCLexHeader.l"
-{ BEGIN(CBLOCK);  PARSE(CFC_TOKENTYPE_CBLOCK_START); }
+{ BEGIN(INITIAL); PARSE(CFC_TOKENTYPE_CBLOCK_CLOSE); }
 	YY_BREAK
 case 20:
+/* rule 20 can match eol */
 YY_RULE_SETUP
 #line 122 "../src/CFCLexHeader.l"
-{ BEGIN(INITIAL); PARSE(CFC_TOKENTYPE_CBLOCK_CLOSE); }
+{ PARSE(CFC_TOKENTYPE_BLOB); }
 	YY_BREAK
 case 21:
 /* rule 21 can match eol */
@@ -992,38 +993,32 @@ YY_RULE_SETUP
 { PARSE(CFC_TOKENTYPE_BLOB); }
 	YY_BREAK
 case 22:
-/* rule 22 can match eol */
 YY_RULE_SETUP
 #line 124 "../src/CFCLexHeader.l"
 { PARSE(CFC_TOKENTYPE_BLOB); }
 	YY_BREAK
+/* Parse docucomments, but skip ordinary comments */
 case 23:
+/* rule 23 can match eol */
 YY_RULE_SETUP
-#line 125 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_BLOB); }
+#line 127 "../src/CFCLexHeader.l"
+{ PARSE(CFC_TOKENTYPE_DOCUCOMMENT); }
 	YY_BREAK
-/* Parse docucomments, but skip ordinary comments */
 case 24:
 /* rule 24 can match eol */
 YY_RULE_SETUP
 #line 128 "../src/CFCLexHeader.l"
-{ PARSE(CFC_TOKENTYPE_DOCUCOMMENT); }
+
 	YY_BREAK
 case 25:
 /* rule 25 can match eol */
 YY_RULE_SETUP
-#line 129 "../src/CFCLexHeader.l"
-
+#line 130 "../src/CFCLexHeader.l"
+/* Skip whitespace. */
 	YY_BREAK
 case 26:
-/* rule 26 can match eol */
 YY_RULE_SETUP
 #line 131 "../src/CFCLexHeader.l"
-/* Skip whitespace. */
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 132 "../src/CFCLexHeader.l"
 { 
                 printf("Bad input character '%s' at line %d\n", yytext, yylineno);
                 yyterminate();
@@ -1031,15 +1026,15 @@ YY_RULE_SETUP
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(CBLOCK):
-#line 136 "../src/CFCLexHeader.l"
+#line 135 "../src/CFCLexHeader.l"
 { yyterminate(); }
 	YY_BREAK
-case 28:
+case 27:
 YY_RULE_SETUP
-#line 137 "../src/CFCLexHeader.l"
+#line 136 "../src/CFCLexHeader.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 1043 "../src/CFCLexHeader.c"
+#line 1038 "../src/CFCLexHeader.c"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -2043,7 +2038,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 137 "../src/CFCLexHeader.l"
+#line 136 "../src/CFCLexHeader.l"
 
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCLexHeader.h
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCLexHeader.h b/clownfish/compiler/src/CFCLexHeader.h
index a983964..16b76f2 100644
--- a/clownfish/compiler/src/CFCLexHeader.h
+++ b/clownfish/compiler/src/CFCLexHeader.h
@@ -307,7 +307,7 @@ extern int yylex (void);
 #undef YY_DECL
 #endif
 
-#line 137 "../src/CFCLexHeader.l"
+#line 136 "../src/CFCLexHeader.l"
 
 
 #line 314 "../src/CFCLexHeader.h"

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCLexHeader.l
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCLexHeader.l b/clownfish/compiler/src/CFCLexHeader.l
index 878789b..567cbeb 100644
--- a/clownfish/compiler/src/CFCLexHeader.l
+++ b/clownfish/compiler/src/CFCLexHeader.l
@@ -108,7 +108,6 @@
 \.\.\.     { PARSE(CFC_TOKENTYPE_ELLIPSIS); }
 ,          { PARSE(CFC_TOKENTYPE_COMMA); }
 ;          { PARSE(CFC_TOKENTYPE_SEMICOLON); }
-:          { PARSE(CFC_TOKENTYPE_COLON); }
 =          { PARSE(CFC_TOKENTYPE_EQUALS); }
 
 -?0x[0-9A-Fa-f]+       { PARSE(CFC_TOKENTYPE_HEX_LITERAL); }

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCParseHeader.y
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCParseHeader.y b/clownfish/compiler/src/CFCParseHeader.y
index 3c4c9c6..40530be 100644
--- a/clownfish/compiler/src/CFCParseHeader.y
+++ b/clownfish/compiler/src/CFCParseHeader.y
@@ -381,12 +381,6 @@ class_head(A) ::=                exposure_specifier(C)
 class_head(A) ::= docucomment(B)                                                    CLASS
qualified_id(E)                              .  { A = S_start_class(state, B,    NULL, NULL,
E,    NULL, NULL ); }
 class_head(A) ::=                                                                   CLASS
qualified_id(E)                              .  { A = S_start_class(state, NULL, NULL, NULL,
E,    NULL, NULL ); }
 
-class_head(A) ::= class_head(B) COLON IDENTIFIER(C).
-{
-    A = B;
-    CFCClass_add_attribute(A, C, "1");
-}
-
 class_defs(A) ::= class_head(B) LEFT_CURLY_BRACE.
 {
     A = B;

http://git-wip-us.apache.org/repos/asf/lucy/blob/d294f1e5/clownfish/compiler/src/CFCTestClass.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCTestClass.c b/clownfish/compiler/src/CFCTestClass.c
index f94a71b..81e09bb 100644
--- a/clownfish/compiler/src/CFCTestClass.c
+++ b/clownfish/compiler/src/CFCTestClass.c
@@ -44,7 +44,7 @@ S_has_symbol(CFCSymbol **symbols, const char *micro_sym);
 
 const CFCTestBatch CFCTEST_BATCH_CLASS = {
     "Clownfish::CFC::Model::Class",
-    86,
+    83,
     S_run_tests
 };
 
@@ -100,8 +100,6 @@ S_run_tests(CFCTest *test) {
     CFCClass *foo_jr
         = CFCClass_create(neato, NULL, "Foo::FooJr", NULL, NULL, NULL, NULL,
                           "Foo", 0, 0);
-    CFCClass_add_attribute(foo_jr, "dumpable", "1");
-    OK(test, CFCClass_has_attribute(foo_jr, "dumpable"), "has_attribute");
     STR_EQ(test, CFCClass_get_struct_sym(foo_jr), "FooJr",
            "get_struct_sym");
     STR_EQ(test, CFCClass_full_struct_sym(foo_jr), "neato_FooJr",
@@ -110,7 +108,6 @@ S_run_tests(CFCTest *test) {
     CFCClass *final_foo
         = CFCClass_create(neato, NULL, "Foo::FooJr::FinalFoo", NULL, NULL, NULL,
                           file_spec, "Foo::FooJr", 1, 0);
-    CFCClass_add_attribute(final_foo, "dumpable", "1");
     OK(test, CFCClass_final(final_foo), "final");
     STR_EQ(test, CFCClass_include_h(final_foo), "Foo/FooJr.h",
            "include_h uses path_part");
@@ -256,7 +253,7 @@ S_run_tests(CFCTest *test) {
             " *\n"
             " * Wow wow wow.\n"
             " */\n"
-            "public class Animal::Dog inherits Animal : lovable : drooly {\n"
+            "public class Animal::Dog inherits Animal {\n"
             "    public inert Dog* init(Dog *self, CharBuf *name,\n"
             "                           CharBuf *fave_food);\n"
             "    inert uint32_t count();\n"
@@ -306,11 +303,6 @@ S_run_tests(CFCTest *test) {
         }
         INT_EQ(test, num_public_methods, 6, "pass acl to Method constructor");
 
-        OK(test, CFCClass_has_attribute(klass, "lovable"),
-           "parsed class attribute");
-        OK(test, CFCClass_has_attribute(klass, "drooly"),
-           "parsed second class attribute");
-
         CFCBase_decref((CFCBase*)klass);
     }
 


Mime
View raw message