correct true/false literal's source

Before:
        Literal, token: true value: true
           Type: bool
           Source: "true;"

After:
        Literal, token: true value: true
           Type: bool
           Source: "true"

Extra token is removed.
This commit is contained in:
Lu Guanqun 2015-12-18 23:48:34 +08:00
parent e7098958d0
commit e4f713b55b

View File

@ -1004,6 +1004,7 @@ ASTPointer<Expression> Parser::parsePrimaryExpression()
{
case Token::TrueLiteral:
case Token::FalseLiteral:
nodeFactory.markEndPosition();
expression = nodeFactory.createNode<Literal>(token, getLiteralAndAdvance());
break;
case Token::Number: