New %types directive
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@800 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
16ff68c288
commit
34c2500de2
2 changed files with 13 additions and 0 deletions
|
|
@ -492,6 +492,7 @@ static void dump_nested(char *parent) {
|
||||||
%token TYPEMAP EXCEPT ECHO NEW APPLY CLEAR DOCONLY
|
%token TYPEMAP EXCEPT ECHO NEW APPLY CLEAR DOCONLY
|
||||||
%token <ivalue> TITLE SECTION SUBSECTION SUBSUBSECTION
|
%token <ivalue> TITLE SECTION SUBSECTION SUBSUBSECTION
|
||||||
%token LESSTHAN GREATERTHAN
|
%token LESSTHAN GREATERTHAN
|
||||||
|
%token TYPES
|
||||||
|
|
||||||
/* Objective C tokens */
|
/* Objective C tokens */
|
||||||
|
|
||||||
|
|
@ -1251,6 +1252,17 @@ statement : INCLUDE STRING LBRACE {
|
||||||
| LOCALSTYLE stylelist {
|
| LOCALSTYLE stylelist {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* %types directive. Used to register types with the type-checker */
|
||||||
|
| TYPES LPAREN parms RPAREN SEMI {
|
||||||
|
Parm *p = $3;
|
||||||
|
while (p) {
|
||||||
|
SwigType *t = Gettype(p);
|
||||||
|
SwigType_remember(t);
|
||||||
|
p = Getnext(p);
|
||||||
|
}
|
||||||
|
Delete($3);
|
||||||
|
}
|
||||||
|
|
||||||
/* Dcumentation disable/enable */
|
/* Dcumentation disable/enable */
|
||||||
|
|
||||||
doc_enable : DOC_DISABLE {
|
doc_enable : DOC_DISABLE {
|
||||||
|
|
|
||||||
|
|
@ -1089,6 +1089,7 @@ extern "C" int yylex(void) {
|
||||||
if (strcmp(yytext,"%apply") == 0) return(APPLY);
|
if (strcmp(yytext,"%apply") == 0) return(APPLY);
|
||||||
if (strcmp(yytext,"%clear") == 0) return(CLEAR);
|
if (strcmp(yytext,"%clear") == 0) return(CLEAR);
|
||||||
if (strcmp(yytext,"%doconly") == 0) return(DOCONLY);
|
if (strcmp(yytext,"%doconly") == 0) return(DOCONLY);
|
||||||
|
if (strcmp(yytext,"%types") == 0) return(TYPES);
|
||||||
}
|
}
|
||||||
// Have an unknown identifier, as a last step, we'll
|
// Have an unknown identifier, as a last step, we'll
|
||||||
// do a typedef lookup on it.
|
// do a typedef lookup on it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue