[ 840878 ] support for %inline { ... } (PATCH)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5401 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
796204c335
commit
6b705938de
1 changed files with 19 additions and 1 deletions
|
|
@ -1308,8 +1308,26 @@ inline_directive : INLINE HBLOCK {
|
|||
Delete($2);
|
||||
Delete(cpps);
|
||||
}
|
||||
|
||||
}
|
||||
;
|
||||
| INLINE LBRACE {
|
||||
String *cpps;
|
||||
skip_balanced('{','}');
|
||||
if (Namespaceprefix) {
|
||||
Swig_error(cparse_file, cparse_start_line, "Error. %%inline directive inside a namespace is disallowed.\n");
|
||||
|
||||
$$ = 0;
|
||||
} else {
|
||||
$$ = new_node("insert");
|
||||
Delitem(scanner_ccode,0);
|
||||
Delitem(scanner_ccode,DOH_END);
|
||||
Setattr($$,"code", Copy(scanner_ccode));
|
||||
cpps=Copy(scanner_ccode);
|
||||
start_inline(Char(cpps), cparse_start_line);
|
||||
Delete(cpps);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
%{ ... %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue