Commit 6b6b827d authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Added helper method QmlJSIndenter::tokenText().

parent a5df2e7b
...@@ -321,6 +321,11 @@ Token QmlJSIndenter::lastToken() const ...@@ -321,6 +321,11 @@ Token QmlJSIndenter::lastToken() const
return Token(); return Token();
} }
QStringRef QmlJSIndenter::tokenText(const Token &token) const
{
return yyLinizerState.line.midRef(token.offset, token.length);
}
/* /*
Saves and restores the state of the global linizer. This enables Saves and restores the state of the global linizer. This enables
backtracking. backtracking.
......
...@@ -85,6 +85,7 @@ private: ...@@ -85,6 +85,7 @@ private:
int indentForStandaloneLine(); int indentForStandaloneLine();
Token lastToken() const; Token lastToken() const;
QStringRef tokenText(const Token &token) const;
private: private:
int ppHardwareTabSize; int ppHardwareTabSize;
......
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