675 if (restrKeyword) { |
675 if (restrKeyword) { |
676 token = QDeclarativeJSGrammar::T_SEMICOLON; |
676 token = QDeclarativeJSGrammar::T_SEMICOLON; |
677 setDone(Other); |
677 setDone(Other); |
678 } else |
678 } else |
679 state = Start; |
679 state = Start; |
680 if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn); |
680 if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2); |
681 } else if (current == 0) { |
681 } else if (current == 0) { |
682 if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn); |
682 if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2); |
683 setDone(Eof); |
683 setDone(Eof); |
684 } |
684 } |
685 |
685 |
686 break; |
686 break; |
687 case InMultiLineComment: |
687 case InMultiLineComment: |
688 if (current == 0) { |
688 if (current == 0) { |
689 setDone(Bad); |
689 setDone(Bad); |
690 err = UnclosedComment; |
690 err = UnclosedComment; |
691 errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file"); |
691 errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file"); |
692 if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn); |
692 if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2); |
693 } else if (isLineTerminator()) { |
693 } else if (isLineTerminator()) { |
694 shiftWindowsLineBreak(); |
694 shiftWindowsLineBreak(); |
695 yylineno++; |
695 yylineno++; |
696 } else if (current == '*' && next1 == '/') { |
696 } else if (current == '*' && next1 == '/') { |
697 state = Start; |
697 state = Start; |
698 shift(1); |
698 shift(1); |
699 if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn); |
699 if (driver) driver->addComment(startpos+2, tokenLength()-3, startlineno, startcolumn+2); |
700 } |
700 } |
701 |
701 |
702 break; |
702 break; |
703 case InIdentifier: |
703 case InIdentifier: |
704 if (isIdentLetter(current) || isDecimalDigit(current)) { |
704 if (isIdentLetter(current) || isDecimalDigit(current)) { |