Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
65f0c2ae
Commit
65f0c2ae
authored
May 01, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkdoc.py: handle conversion operators and template arguments in function names
parent
6d252961
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
tools/mkdoc.py
+3
-1
No files found.
tools/mkdoc.py
View file @
65f0c2ae
...
@@ -32,6 +32,7 @@ PRINT_LIST = [
...
@@ -32,6 +32,7 @@ PRINT_LIST = [
CursorKind
.
CLASS_TEMPLATE
,
CursorKind
.
CLASS_TEMPLATE
,
CursorKind
.
FUNCTION_DECL
,
CursorKind
.
FUNCTION_DECL
,
CursorKind
.
FUNCTION_TEMPLATE
,
CursorKind
.
FUNCTION_TEMPLATE
,
CursorKind
.
CONVERSION_FUNCTION
,
CursorKind
.
CXX_METHOD
,
CursorKind
.
CXX_METHOD
,
CursorKind
.
CONSTRUCTOR
,
CursorKind
.
CONSTRUCTOR
,
CursorKind
.
FIELD_DECL
CursorKind
.
FIELD_DECL
...
@@ -62,6 +63,7 @@ def d(s):
...
@@ -62,6 +63,7 @@ def d(s):
def
sanitize_name
(
name
):
def
sanitize_name
(
name
):
global
registered_names
global
registered_names
name
=
re
.
sub
(
r'type-parameter-0-([0-9]+)'
,
r'T\1'
,
name
)
for
k
,
v
in
CPP_OPERATORS
.
items
():
for
k
,
v
in
CPP_OPERATORS
.
items
():
name
=
name
.
replace
(
'operator
%
s'
%
k
,
'operator_
%
s'
%
v
)
name
=
name
.
replace
(
'operator
%
s'
%
k
,
'operator_
%
s'
%
v
)
name
=
re
.
sub
(
'<.*>'
,
''
,
name
)
name
=
re
.
sub
(
'<.*>'
,
''
,
name
)
...
@@ -150,7 +152,7 @@ def process_comment(comment):
...
@@ -150,7 +152,7 @@ def process_comment(comment):
else
:
else
:
result
+=
wrapped
+
'
\n\n
'
result
+=
wrapped
+
'
\n\n
'
wrapper
.
initial_indent
=
wrapper
.
subsequent_indent
=
''
wrapper
.
initial_indent
=
wrapper
.
subsequent_indent
=
''
return
result
.
rstrip
()
return
result
.
rstrip
()
.
lstrip
(
'
\n
'
)
def
extract
(
filename
,
node
,
prefix
,
output
):
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