new_node refactor

Reduce code duplication for doxygen to match code in master prior to
merge to master
This commit is contained in:
William S Fulton 2018-05-19 09:00:06 +01:00
commit 9deaa6ff24
4 changed files with 17 additions and 20 deletions

View file

@ -83,10 +83,7 @@ static void yyerror (const char *e) {
}
static Node *new_node(const_String_or_char_ptr tag) {
Node *n = NewHash();
set_nodeType(n,tag);
Setfile(n,cparse_file);
Setline(n,cparse_line);
Node *n = Swig_cparse_new_node(tag);
/* Remember the previous node in case it will need a post-comment */
previousNode = currentNode;
currentNode = n;