Fix comma in attributes on enum value
This commit is contained in:
parent
0b71d7d3b4
commit
ced136a3a4
1 changed files with 5 additions and 5 deletions
|
|
@ -266,12 +266,12 @@ namespace
|
||||||
while (!token_after_is(tu, file, cur, end, ";"))
|
while (!token_after_is(tu, file, cur, end, ";"))
|
||||||
end = get_next_location(tu, file, end);
|
end = get_next_location(tu, file, end);
|
||||||
}
|
}
|
||||||
else if (kind == CXCursor_EnumConstantDecl && !token_after_is(tu, file, cur, end, ",")
|
else if (kind == CXCursor_EnumConstantDecl && !token_after_is(tu, file, cur, end, ","))
|
||||||
&& !token_after_is(tu, file, cur, end, ";"))
|
|
||||||
{
|
{
|
||||||
while (!token_after_is(tu, file, cur, end, ",")
|
// need to support attributes
|
||||||
&& !token_after_is(tu, file, cur, end, ";"))
|
// just give up and extend the range to the range of the entire enum...
|
||||||
end = get_next_location(tu, file, end);
|
auto parent = clang_getCursorLexicalParent(cur);
|
||||||
|
end = clang_getRangeEnd(clang_getCursorExtent(parent));
|
||||||
}
|
}
|
||||||
else if (kind == CXCursor_FieldDecl || kind == CXCursor_ParmDecl
|
else if (kind == CXCursor_FieldDecl || kind == CXCursor_ParmDecl
|
||||||
|| kind == CXCursor_NonTypeTemplateParameter
|
|| kind == CXCursor_NonTypeTemplateParameter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue