From 2bfd4d2720b55df0141189633ef6fae530663d04 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 21 Nov 2012 16:18:37 +0000 Subject: name and docuemnt the binding property attribute --- src/nsgenbind-parser.y | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/nsgenbind-parser.y') diff --git a/src/nsgenbind-parser.y b/src/nsgenbind-parser.y index b104f2f..984513e 100644 --- a/src/nsgenbind-parser.y +++ b/src/nsgenbind-parser.y @@ -36,7 +36,7 @@ char *errtxt; { char* text; struct genbind_node *node; - int number; + long value; } %token TOK_IDLFILE @@ -54,6 +54,7 @@ char *errtxt; %token TOK_INTERNAL %token TOK_UNSHARED %token TOK_SHARED +%token TOK_PROPERTY %token TOK_IDENTIFIER %token TOK_STRING_LITERAL @@ -61,8 +62,8 @@ char *errtxt; %type CBlock -%type Modifiers -%type Modifier +%type Modifiers +%type Modifier %type Statement %type Statements @@ -77,7 +78,7 @@ char *errtxt; %type Private %type Internal %type Interface -%type Shared +%type Property %type Operation %type Api %type Getter @@ -261,7 +262,7 @@ BindingArg | Interface | - Shared + Property ; Type @@ -300,11 +301,11 @@ Interface } ; -Shared +Property : - TOK_SHARED Modifiers TOK_IDENTIFIER ';' + TOK_PROPERTY Modifiers TOK_IDENTIFIER ';' { - $$ = genbind_new_node(GENBIND_NODE_TYPE_BINDING_SHARED, + $$ = genbind_new_node(GENBIND_NODE_TYPE_BINDING_PROPERTY, NULL, genbind_new_node(GENBIND_NODE_TYPE_MODIFIER, genbind_new_node(GENBIND_NODE_TYPE_IDENT, @@ -318,7 +319,7 @@ Modifiers : /* empty */ { - $$ = 0; + $$ = GENBIND_TYPE_NONE; } | Modifiers Modifier @@ -338,6 +339,11 @@ Modifier { $$ = GENBIND_TYPE_UNSHARED; } + | + TOK_SHARED + { + $$ = GENBIND_TYPE_NONE; + } ; %% -- cgit v1.2.3