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
65f0c2ae
Commit
65f0c2ae
authored
May 01, 2016
by
Wenzel Jakob
Browse files
mkdoc.py: handle conversion operators and template arguments in function names
parent
6d252961
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tools/mkdoc.py
tools/mkdoc.py
+3
-1
No files found.
tools/mkdoc.py
View file @
65f0c2ae
...
...
@@ -32,6 +32,7 @@ PRINT_LIST = [
CursorKind
.
CLASS_TEMPLATE
,
CursorKind
.
FUNCTION_DECL
,
CursorKind
.
FUNCTION_TEMPLATE
,
CursorKind
.
CONVERSION_FUNCTION
,
CursorKind
.
CXX_METHOD
,
CursorKind
.
CONSTRUCTOR
,
CursorKind
.
FIELD_DECL
...
...
@@ -62,6 +63,7 @@ def d(s):
def
sanitize_name
(
name
):
global
registered_names
name
=
re
.
sub
(
r
'type-parameter-0-([0-9]+)'
,
r
'T\1'
,
name
)
for
k
,
v
in
CPP_OPERATORS
.
items
():
name
=
name
.
replace
(
'operator%s'
%
k
,
'operator_%s'
%
v
)
name
=
re
.
sub
(
'<.*>'
,
''
,
name
)
...
...
@@ -150,7 +152,7 @@ def process_comment(comment):
else
:
result
+=
wrapped
+
'
\n\n
'
wrapper
.
initial_indent
=
wrapper
.
subsequent_indent
=
''
return
result
.
rstrip
()
return
result
.
rstrip
()
.
lstrip
(
'
\n
'
)
def
extract
(
filename
,
node
,
prefix
,
output
):
...
...
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