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
b8ff60c0
Commit
b8ff60c0
authored
Apr 07, 2020
by
Ole Christian Eidheim
Browse files
Improved Token::get_kind to make Structured binding declarations work properly
parent
2edcb84b
Pipeline
#133583724
passed with stage
in 3 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/token.cc
src/token.cc
+3
-3
No files found.
src/token.cc
View file @
b8ff60c0
...
...
@@ -26,10 +26,10 @@ clangmm::Token::Kind clangmm::Token::get_kind() const {
bool
clangmm
::
Token
::
is_identifier
()
const
{
auto
token_kind
=
get_kind
();
auto
cursor
=
get_cursor
();
if
(
token_kind
==
clangmm
::
Token
::
Kind
::
Identifier
&&
cursor
.
is_valid_kind
())
if
(
token_kind
==
clangmm
::
Token
::
Kind
::
Identifier
)
return
true
;
else
if
(
token_kind
==
clangmm
::
Token
::
Kind
::
Keyword
&&
cursor
.
is_valid_kind
())
{
auto
cursor
=
get_cursor
();
if
(
token_kind
==
clangmm
::
Token
::
Kind
::
Keyword
&&
cursor
.
is_valid_kind
())
{
auto
spelling
=
get_spelling
();
if
(
spelling
==
"operator"
||
(
spelling
==
"bool"
&&
get_cursor
().
get_spelling
()
==
"operator bool"
))
return
true
;
...
...
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