Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
b2ff6314
Commit
b2ff6314
authored
Jan 08, 2009
by
Roberto Raggi
Browse files
Added objcEnabled()/setObjcEnabled() to SimpleLexer.
parent
c06c77da
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/SimpleLexer.cpp
View file @
b2ff6314
...
...
@@ -57,7 +57,8 @@ bool SimpleToken::isKeyword() const
SimpleLexer
::
SimpleLexer
()
:
_lastState
(
0
),
_skipComments
(
false
),
_qtMocRunEnabled
(
true
)
_qtMocRunEnabled
(
true
),
_objcEnabled
(
false
)
{
}
SimpleLexer
::~
SimpleLexer
()
...
...
@@ -73,6 +74,17 @@ void SimpleLexer::setQtMocRunEnabled(bool enabled)
_qtMocRunEnabled
=
enabled
;
}
bool
SimpleLexer
::
objcEnabled
()
const
{
return
_objcEnabled
;
}
void
SimpleLexer
::
setObjcEnabled
(
bool
onoff
)
{
_objcEnabled
=
onoff
;
}
bool
SimpleLexer
::
skipComments
()
const
{
return
_skipComments
;
...
...
@@ -93,6 +105,7 @@ QList<SimpleToken> SimpleLexer::operator()(const QString &text, int state)
Lexer
lex
(
firstChar
,
lastChar
);
lex
.
setQtMocRunEnabled
(
_qtMocRunEnabled
);
lex
.
setObjcEnabled
(
_objcEnabled
);
if
(
!
_skipComments
)
lex
.
setScanCommentTokens
(
true
);
...
...
src/libs/cplusplus/SimpleLexer.h
View file @
b2ff6314
...
...
@@ -91,6 +91,9 @@ public:
bool
qtMocRunEnabled
()
const
;
void
setQtMocRunEnabled
(
bool
enabled
);
bool
objcEnabled
()
const
;
void
setObjcEnabled
(
bool
onoff
);
QList
<
SimpleToken
>
operator
()(
const
QString
&
text
,
int
state
=
0
);
int
state
()
const
...
...
@@ -100,6 +103,7 @@ private:
int
_lastState
;
bool
_skipComments
:
1
;
bool
_qtMocRunEnabled
:
1
;
bool
_objcEnabled
:
1
;
};
}
// end of namespace CPlusPlus
...
...
Write
Preview
Supports
Markdown
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