Handle comments at the end of braceless control statements.

This commit is contained in:
Roberto Raggi
2010-01-19 12:50:03 +01:00
parent 64a167c2f5
commit 1bc838fd2b
3 changed files with 27 additions and 5 deletions

View File

@@ -41,11 +41,9 @@ namespace QmlJS {
class QMLJS_EXPORT QmlJSScanner
{
public:
struct Token {
int offset;
int length;
enum Kind {
EndOfFile,
Keyword,
Identifier,
String,
@@ -62,8 +60,13 @@ public:
Colon,
Comma,
Dot
} kind;
};
int offset;
int length;
Kind kind;
inline Token(): offset(0), length(0), kind(EndOfFile) {}
inline Token(int o, int l, Kind k): offset(o), length(l), kind(k) {}
inline int begin() const { return offset; }
inline int end() const { return offset + length; }