From e0b8bbbce965e4d9ca6c364a1289150477411d54 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 15 May 2019 21:14:44 -0400 Subject: [PATCH] Use a file-local constant for non-prefixing nodes. --- tools/mkdoc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 tools/mkdoc.py diff --git a/tools/mkdoc.py b/tools/mkdoc.py old mode 100644 new mode 100755 index 2bf4f0352..dd954ddcf --- a/tools/mkdoc.py +++ b/tools/mkdoc.py @@ -41,6 +41,10 @@ PRINT_LIST = [ CursorKind.FIELD_DECL ] +PREFIX_BLACKLIST = [ + CursorKind.TRANSLATION_UNIT +] + CPP_OPERATORS = { '<=': 'le', '>=': 'ge', '==': 'eq', '!=': 'ne', '[]': 'array', '+=': 'iadd', '-=': 'isub', '*=': 'imul', '/=': 'idiv', '%=': @@ -192,7 +196,7 @@ def extract(filename, node, prefix, output): return 0 if node.kind in RECURSE_LIST: sub_prefix = prefix - if node.kind != CursorKind.TRANSLATION_UNIT: + if node.kind not in PREFIX_BLACKLIST: if len(sub_prefix) > 0: sub_prefix += '_' sub_prefix += d(node.spelling)