Eolian parser: Allow tagging properties with @constructor.
authorTom Hacohen <tom@stosb.com>
Thu, 7 Aug 2014 13:01:23 +0000 (14:01 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Thu, 21 Aug 2014 08:26:03 +0000 (09:26 +0100)
Thanks to Quaker for the exact directions.

src/lib/eolian/eo_parser.c

index 3c231db..4e6fb02 100644 (file)
@@ -1009,7 +1009,8 @@ parse_property(Eo_Lexer *ls)
    Eo_Property_Def *prop = NULL;
    Eina_Bool has_get       = EINA_FALSE, has_set    = EINA_FALSE,
              has_keys      = EINA_FALSE, has_values = EINA_FALSE,
-             has_protected = EINA_FALSE, has_class  = EINA_FALSE;
+             has_protected = EINA_FALSE, has_class  = EINA_FALSE,
+             has_constructor = EINA_FALSE;
    prop = calloc(1, sizeof(Eo_Property_Def));
    prop->base.line = ls->line_number;
    prop->base.column = ls->column;
@@ -1029,6 +1030,11 @@ parse_property(Eo_Lexer *ls)
         prop->is_class = EINA_TRUE;
         eo_lexer_get(ls);
         break;
+      case KW_at_constructor:
+        CASE_LOCK(ls, constructor, "constructor qualifier");
+        eo_lexer_get(ls);
+        break;
+
       default:
         goto body;
      }