Commit b9b117aa authored by Erik Verbruggen's avatar Erik Verbruggen

Fixed testcases.

Change-Id: Ia20094acbadcb6bec921ec77751f2c73a94e05cb
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent db25f9a1
......@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
Document::Ptr doc = Document::create(fileName);
doc->control()->setDiagnosticClient(0);
doc->setSource(source);
doc->setUtf8Source(source);
doc->parse();
}
......
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// W A R N I N G
......@@ -576,7 +564,7 @@ virtual bool visit(ExceptionDeclarationAST *ast)
return false;
}
virtual bool visit(ExceptionSpecificationAST *ast)
virtual bool visit(DynamicExceptionSpecificationAST *ast)
{
if (ast->throw_token)
terminal(ast->throw_token, ast);
......@@ -591,6 +579,18 @@ virtual bool visit(ExceptionSpecificationAST *ast)
return false;
}
virtual bool visit(NoExceptSpecificationAST *ast)
{
if (ast->noexcept_token)
terminal(ast->noexcept_token, ast);
if (ast->lparen_token)
terminal(ast->lparen_token, ast);
nonterminal(ast->expression);
if (ast->rparen_token)
terminal(ast->rparen_token, ast);
return false;
}
virtual bool visit(ExpressionOrDeclarationStatementAST *ast)
{
nonterminal(ast->expression);
......@@ -794,6 +794,8 @@ virtual bool visit(TemplateIdAST *ast)
virtual bool visit(NamespaceAST *ast)
{
if (ast->inline_token)
terminal(ast->inline_token, ast);
if (ast->namespace_token)
terminal(ast->namespace_token, ast);
if (ast->identifier_token)
......@@ -1071,6 +1073,13 @@ virtual bool visit(SizeofExpressionAST *ast)
return false;
}
virtual bool visit(PointerLiteralAST *ast)
{
if (ast->literal_token)
terminal(ast->literal_token, ast);
return false;
}
virtual bool visit(NumericLiteralAST *ast)
{
if (ast->literal_token)
......@@ -1102,6 +1111,23 @@ virtual bool visit(NestedExpressionAST *ast)
return false;
}
virtual bool visit(StaticAssertDeclarationAST *ast)
{
if (ast->static_assert_token)
terminal(ast->static_assert_token, ast);
if (ast->lparen_token)
terminal(ast->lparen_token, ast);
nonterminal(ast->expression);
if (ast->comma_token)
terminal(ast->comma_token, ast);
nonterminal(ast->string_literal);
if (ast->rparen_token)
terminal(ast->rparen_token, ast);
if (ast->semicolon_token)
terminal(ast->semicolon_token, ast);
return false;
}
virtual bool visit(StringLiteralAST *ast)
{
if (ast->literal_token)
......@@ -1575,7 +1601,7 @@ virtual bool visit(LambdaCaptureAST *ast)
return false;
}
virtual bool visit(CaptureAST *)
virtual bool visit(CaptureAST *ast)
{
return false;
}
......
......@@ -374,7 +374,7 @@ int main(int argc, char *argv[])
Document::Ptr doc = Document::create(fileName);
doc->control()->setDiagnosticClient(0);
doc->setSource(source);
doc->setUtf8Source(source);
doc->parse();
doc->check();
......
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