Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
e0b8bbbc
Commit
e0b8bbbc
authored
May 15, 2019
by
Dan
Committed by
Wenzel Jakob
Jun 11, 2019
Browse files
Use a file-local constant for non-prefixing nodes.
parent
2c8c5c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
tools/mkdoc.py
tools/mkdoc.py
+5
-1
No files found.
tools/mkdoc.py
100644 → 100755
View file @
e0b8bbbc
...
...
@@ -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_UNI
T
:
if
node
.
kind
not
in
PREFIX_BLACKLIS
T
:
if
len
(
sub_prefix
)
>
0
:
sub_prefix
+=
'_'
sub_prefix
+=
d
(
node
.
spelling
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment