Add lambda functions to the symbol tables and add ability to suppress lambda warnings.

This commit is contained in:
William S Fulton 2013-02-04 20:05:34 +00:00
commit 6399428a62
7 changed files with 64 additions and 7 deletions

View file

@ -136,6 +136,12 @@ public:
return SWIG_OK;
}
virtual int lambdaDeclaration(Node *n) {
show_attributes(n);
emit_children(n);
return SWIG_OK;
}
virtual int enumDeclaration(Node *n) {
show_attributes(n);
emit_children(n);

View file

@ -139,6 +139,8 @@ int Dispatcher::emit_one(Node *n) {
ret = namespaceDeclaration(n);
} else if (strcmp(tag, "template") == 0) {
ret = templateDeclaration(n);
} else if (strcmp(tag, "lambda") == 0) {
ret = lambdaDeclaration(n);
}
/* ===============================================================
@ -285,6 +287,9 @@ int Dispatcher::classDeclaration(Node *n) {
int Dispatcher::templateDeclaration(Node *n) {
return defaultHandler(n);
}
int Dispatcher::lambdaDeclaration(Node *n) {
return defaultHandler(n);
}
int Dispatcher::classforwardDeclaration(Node *n) {
return defaultHandler(n);
}

View file

@ -99,6 +99,7 @@ public:
virtual int usingDeclaration(Node *n);
virtual int namespaceDeclaration(Node *n);
virtual int templateDeclaration(Node *n);
virtual int lambdaDeclaration(Node *n);
enum AccessMode { PUBLIC, PRIVATE, PROTECTED };

View file

@ -524,7 +524,7 @@ class TypePass:private Dispatcher {
}
/* ------------------------------------------------------------
* namespaceDeclaration()
* templateDeclaration()
* ------------------------------------------------------------ */
virtual int templateDeclaration(Node *n) {
@ -543,6 +543,14 @@ class TypePass:private Dispatcher {
return SWIG_OK;
}
/* ------------------------------------------------------------
* lambdaDeclaration()
* ------------------------------------------------------------ */
virtual int lambdaDeclaration(Node *) {
return SWIG_OK;
}
/* ------------------------------------------------------------
* classforwardDeclaration()
* ------------------------------------------------------------ */