diff --git a/SWIG/Lib/swig.swg b/SWIG/Lib/swig.swg index 07b3a18f7..a3adfbf3b 100644 --- a/SWIG/Lib/swig.swg +++ b/SWIG/Lib/swig.swg @@ -246,6 +246,7 @@ static int NAME(TYPE x) { %define %isfunction match$kind="function" %enddef %define %isvariable match$kind="variable" %enddef %define %isimmutable "match$feature:immutable"="1" %enddef +%define %hasvalue match$hasvalue="1" %enddef %define %isstatic match$storage="static" %enddef %define %isfriend match$storage="friend" %enddef @@ -254,7 +255,7 @@ static int NAME(TYPE x) { %define %isexplicit match$storage="explicit" %enddef %define %isextern match$storage="extern" %enddef -%define %ismember match$parentNode$nodeType="class" %enddef +%define %ismember match$ismember="1" %enddef %define %isglobal notmatch$parentNode$nodeType="class" %enddef %define %innamespace match$parentNode$nodeType="namespace" %enddef diff --git a/SWIG/Source/CParse/parser.y b/SWIG/Source/CParse/parser.y index e89ce988d..95834f5a1 100644 --- a/SWIG/Source/CParse/parser.y +++ b/SWIG/Source/CParse/parser.y @@ -322,7 +322,7 @@ static void add_symbols(Node *n) { } set_parentNode(n,current_class); - Setattr(n,"memberof",current_class); + Setattr(n,"ismember","1"); } } if (!isfriend && inclass) { @@ -364,6 +364,9 @@ static void add_symbols(Node *n) { } else { SwigType *type = Getattr(n, k_type); Setattr(n,k_kind,"variable"); + if (Getattr(n,k_value)) { + Setattr(n,"hasvalue","1"); + } if (type && !SwigType_ismutable(type)) { SetFlag(n,"feature:immutable"); }