Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
7e10664e
Commit
7e10664e
authored
Feb 19, 2009
by
Roberto Raggi
Browse files
Instroduced TranslationUnit::spell(tokenIndex).
parent
764379de
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/ASTVisitor.cpp
View file @
7e10664e
...
...
@@ -77,12 +77,7 @@ int ASTVisitor::tokenKind(unsigned index) const
{
return
translationUnit
()
->
tokenKind
(
index
);
}
const
char
*
ASTVisitor
::
spell
(
unsigned
index
)
const
{
if
(
!
index
)
return
0
;
return
translationUnit
()
->
tokenAt
(
index
).
spell
();
}
{
return
translationUnit
()
->
spell
(
index
);
}
Identifier
*
ASTVisitor
::
identifier
(
unsigned
index
)
const
{
return
translationUnit
()
->
identifier
(
index
);
}
...
...
src/shared/cplusplus/TranslationUnit.cpp
View file @
7e10664e
...
...
@@ -134,6 +134,14 @@ const Token &TranslationUnit::tokenAt(unsigned index) const
int
TranslationUnit
::
tokenKind
(
unsigned
index
)
const
{
return
_tokens
->
at
(
index
).
kind
;
}
const
char
*
TranslationUnit
::
spell
(
unsigned
index
)
const
{
if
(
!
index
)
return
0
;
return
_tokens
->
at
(
index
).
spell
();
}
Identifier
*
TranslationUnit
::
identifier
(
unsigned
index
)
const
{
return
_tokens
->
at
(
index
).
identifier
;
}
...
...
src/shared/cplusplus/TranslationUnit.h
View file @
7e10664e
...
...
@@ -87,6 +87,7 @@ public:
unsigned
tokenCount
()
const
;
const
Token
&
tokenAt
(
unsigned
index
)
const
;
int
tokenKind
(
unsigned
index
)
const
;
const
char
*
spell
(
unsigned
index
)
const
;
unsigned
matchingBrace
(
unsigned
index
)
const
;
Identifier
*
identifier
(
unsigned
index
)
const
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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