Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
b2ff6314
Commit
b2ff6314
authored
16 years ago
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Added objcEnabled()/setObjcEnabled() to SimpleLexer.
parent
c06c77da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/cplusplus/SimpleLexer.cpp
+14
-1
14 additions, 1 deletion
src/libs/cplusplus/SimpleLexer.cpp
src/libs/cplusplus/SimpleLexer.h
+4
-0
4 additions, 0 deletions
src/libs/cplusplus/SimpleLexer.h
with
18 additions
and
1 deletion
src/libs/cplusplus/SimpleLexer.cpp
+
14
−
1
View file @
b2ff6314
...
@@ -57,7 +57,8 @@ bool SimpleToken::isKeyword() const
...
@@ -57,7 +57,8 @@ bool SimpleToken::isKeyword() const
SimpleLexer
::
SimpleLexer
()
SimpleLexer
::
SimpleLexer
()
:
_lastState
(
0
),
:
_lastState
(
0
),
_skipComments
(
false
),
_skipComments
(
false
),
_qtMocRunEnabled
(
true
)
_qtMocRunEnabled
(
true
),
_objcEnabled
(
false
)
{
}
{
}
SimpleLexer
::~
SimpleLexer
()
SimpleLexer
::~
SimpleLexer
()
...
@@ -73,6 +74,17 @@ void SimpleLexer::setQtMocRunEnabled(bool enabled)
...
@@ -73,6 +74,17 @@ void SimpleLexer::setQtMocRunEnabled(bool enabled)
_qtMocRunEnabled
=
enabled
;
_qtMocRunEnabled
=
enabled
;
}
}
bool
SimpleLexer
::
objcEnabled
()
const
{
return
_objcEnabled
;
}
void
SimpleLexer
::
setObjcEnabled
(
bool
onoff
)
{
_objcEnabled
=
onoff
;
}
bool
SimpleLexer
::
skipComments
()
const
bool
SimpleLexer
::
skipComments
()
const
{
{
return
_skipComments
;
return
_skipComments
;
...
@@ -93,6 +105,7 @@ QList<SimpleToken> SimpleLexer::operator()(const QString &text, int state)
...
@@ -93,6 +105,7 @@ QList<SimpleToken> SimpleLexer::operator()(const QString &text, int state)
Lexer
lex
(
firstChar
,
lastChar
);
Lexer
lex
(
firstChar
,
lastChar
);
lex
.
setQtMocRunEnabled
(
_qtMocRunEnabled
);
lex
.
setQtMocRunEnabled
(
_qtMocRunEnabled
);
lex
.
setObjcEnabled
(
_objcEnabled
);
if
(
!
_skipComments
)
if
(
!
_skipComments
)
lex
.
setScanCommentTokens
(
true
);
lex
.
setScanCommentTokens
(
true
);
...
...
This diff is collapsed.
Click to expand it.
src/libs/cplusplus/SimpleLexer.h
+
4
−
0
View file @
b2ff6314
...
@@ -91,6 +91,9 @@ public:
...
@@ -91,6 +91,9 @@ public:
bool
qtMocRunEnabled
()
const
;
bool
qtMocRunEnabled
()
const
;
void
setQtMocRunEnabled
(
bool
enabled
);
void
setQtMocRunEnabled
(
bool
enabled
);
bool
objcEnabled
()
const
;
void
setObjcEnabled
(
bool
onoff
);
QList
<
SimpleToken
>
operator
()(
const
QString
&
text
,
int
state
=
0
);
QList
<
SimpleToken
>
operator
()(
const
QString
&
text
,
int
state
=
0
);
int
state
()
const
int
state
()
const
...
@@ -100,6 +103,7 @@ private:
...
@@ -100,6 +103,7 @@ private:
int
_lastState
;
int
_lastState
;
bool
_skipComments
:
1
;
bool
_skipComments
:
1
;
bool
_qtMocRunEnabled
:
1
;
bool
_qtMocRunEnabled
:
1
;
bool
_objcEnabled
:
1
;
};
};
}
// end of namespace CPlusPlus
}
// end of namespace CPlusPlus
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment