Commit ad0331a2 authored by hjk's avatar hjk Committed by Nikolai Kosjar
Browse files

C++: Inline Lexer::control()



Change-Id: Ia37ec33fb031fdea4ad1890fcea3a80b7b46e272
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 13b0ca00
...@@ -29,6 +29,7 @@ using namespace CPlusPlus; ...@@ -29,6 +29,7 @@ using namespace CPlusPlus;
Lexer::Lexer(TranslationUnit *unit) Lexer::Lexer(TranslationUnit *unit)
: _translationUnit(unit), : _translationUnit(unit),
_control(unit->control()),
_state(State_Default), _state(State_Default),
_flags(0), _flags(0),
_currentLine(1) _currentLine(1)
...@@ -40,6 +41,7 @@ Lexer::Lexer(TranslationUnit *unit) ...@@ -40,6 +41,7 @@ Lexer::Lexer(TranslationUnit *unit)
Lexer::Lexer(const char *firstChar, const char *lastChar) Lexer::Lexer(const char *firstChar, const char *lastChar)
: _translationUnit(0), : _translationUnit(0),
_control(0),
_state(State_Default), _state(State_Default),
_flags(0), _flags(0),
_currentLine(1) _currentLine(1)
...@@ -54,14 +56,6 @@ Lexer::~Lexer() ...@@ -54,14 +56,6 @@ Lexer::~Lexer()
TranslationUnit *Lexer::translationUnit() const TranslationUnit *Lexer::translationUnit() const
{ return _translationUnit; } { return _translationUnit; }
Control *Lexer::control() const
{
if (_translationUnit)
return _translationUnit->control();
return 0;
}
void Lexer::setSource(const char *firstChar, const char *lastChar) void Lexer::setSource(const char *firstChar, const char *lastChar)
{ {
_firstChar = firstChar; _firstChar = firstChar;
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
Lexer(const char *firstChar, const char *lastChar); Lexer(const char *firstChar, const char *lastChar);
~Lexer(); ~Lexer();
Control *control() const; Control *control() const { return _control; }
TranslationUnit *translationUnit() const; TranslationUnit *translationUnit() const;
bool qtMocRunEnabled() const; bool qtMocRunEnabled() const;
...@@ -118,6 +118,7 @@ private: ...@@ -118,6 +118,7 @@ private:
}; };
TranslationUnit *_translationUnit; TranslationUnit *_translationUnit;
Control *_control;
const char *_firstChar; const char *_firstChar;
const char *_currentChar; const char *_currentChar;
const char *_lastChar; const char *_lastChar;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment