Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
cppit
libclangmm
Commits
ee128a07
Commit
ee128a07
authored
Nov 30, 2018
by
S
Browse files
getting translation unit cursor
parent
5e0c3927
Pipeline
#38599944
passed with stage
in 3 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
src/translation_unit.cc
src/translation_unit.cc
+4
-0
src/translation_unit.h
src/translation_unit.h
+1
-0
No files found.
src/translation_unit.cc
View file @
ee128a07
...
...
@@ -93,6 +93,10 @@ std::unique_ptr<clangmm::Tokens> clangmm::TranslationUnit::get_tokens(unsigned s
return
std
::
unique_ptr
<
Tokens
>
(
new
Tokens
(
cx_tu
,
range
));
}
clangmm
::
Cursor
clangmm
::
TranslationUnit
::
get_cursor
()
{
return
Cursor
(
clang_getTranslationUnitCursor
(
cx_tu
));
}
clangmm
::
Cursor
clangmm
::
TranslationUnit
::
get_cursor
(
const
std
::
string
&
path
,
unsigned
offset
)
{
SourceLocation
location
(
cx_tu
,
path
,
offset
);
return
Cursor
(
clang_getCursor
(
cx_tu
,
location
.
cx_location
));
...
...
src/translation_unit.h
View file @
ee128a07
...
...
@@ -37,6 +37,7 @@ namespace clangmm {
std
::
unique_ptr
<
Tokens
>
get_tokens
(
unsigned
start_line
,
unsigned
start_column
,
unsigned
end_line
,
unsigned
end_column
);
Cursor
get_cursor
();
Cursor
get_cursor
(
const
std
::
string
&
path
,
unsigned
offset
);
Cursor
get_cursor
(
const
std
::
string
&
path
,
unsigned
line
,
unsigned
column
);
Cursor
get_cursor
(
const
SourceLocation
&
location
);
...
...
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