Skip to content

Commit 2647e77

Browse files
committed
Revert "Add support for bracket/hblock to typemap kwargs grammar"
This reverts commit 3db4303.
1 parent 206089b commit 2647e77

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

Source/CParse/parser.y

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ static String *add_qualifier_to_declarator(SwigType *type, SwigType *qualifier)
16931693
%type <decl> abstract_declarator direct_abstract_declarator ctor_end;
16941694
%type <tmap> typemap_type;
16951695
%type <str> idcolon idcolontail idcolonnt idcolontailnt idtemplate idtemplatetemplate stringbrace stringbracesemi;
1696-
%type <str> string stringnum stringnumbrace wstring;
1696+
%type <str> string stringnum wstring;
16971697
%type <tparms> template_parms;
16981698
%type <dtype> cpp_end cpp_vend;
16991699
%type <intvalue> rename_namewarn;
@@ -7327,12 +7327,12 @@ options : LPAREN kwargs RPAREN {
73277327

73287328

73297329
/* Keyword arguments */
7330-
kwargs : idstring EQUAL stringnumbrace {
7330+
kwargs : idstring EQUAL stringnum {
73317331
$$ = NewHash();
73327332
Setattr($$,"name",$1);
73337333
Setattr($$,"value",$3);
73347334
}
7335-
| idstring EQUAL stringnumbrace COMMA kwargs {
7335+
| idstring EQUAL stringnum COMMA kwargs {
73367336
$$ = NewHash();
73377337
Setattr($$,"name",$1);
73387338
Setattr($$,"value",$3);
@@ -7366,26 +7366,6 @@ stringnum : string {
73667366
}
73677367
;
73687368

7369-
stringnumbrace : string {
7370-
$$ = $1;
7371-
}
7372-
| LBRACE {
7373-
/* Assign exact typemap contents */
7374-
String *code;
7375-
skip_balanced('{','}');
7376-
Delitem(scanner_ccode,0);
7377-
Delitem(scanner_ccode,DOH_END);
7378-
code = Copy(scanner_ccode);
7379-
$$ = code;
7380-
}
7381-
| HBLOCK {
7382-
$$ = $1;
7383-
}
7384-
| exprnum {
7385-
$$ = Char($1.val);
7386-
}
7387-
;
7388-
73897369
empty : ;
73907370

73917371
%%

0 commit comments

Comments
 (0)