OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1619 if (fni_ != NULL) fni_->Enter(); | 1619 if (fni_ != NULL) fni_->Enter(); |
1620 typename Traits::Type::Expression expression = | 1620 typename Traits::Type::Expression expression = |
1621 this->ParseConditionalExpression(accept_IN, CHECK_OK); | 1621 this->ParseConditionalExpression(accept_IN, CHECK_OK); |
1622 | 1622 |
1623 if (!Token::IsAssignmentOp(peek())) { | 1623 if (!Token::IsAssignmentOp(peek())) { |
1624 if (fni_ != NULL) fni_->Leave(); | 1624 if (fni_ != NULL) fni_->Leave(); |
1625 // Parsed conditional expression only (no assignment). | 1625 // Parsed conditional expression only (no assignment). |
1626 return expression; | 1626 return expression; |
1627 } | 1627 } |
1628 | 1628 |
1629 if (!IsValidLeftHandSide(expression)) { | 1629 if (!this->IsValidLeftHandSide(expression)) { |
tfarina
2014/03/19 17:33:01
what was the error? Usually it is good to paste it
rossberg
2014/03/19 18:13:16
The usual C++ idiocy about template parameter depe
| |
1630 this->ReportMessageAt(lhs_location, "invalid_lhs_in_assignment", true); | 1630 this->ReportMessageAt(lhs_location, "invalid_lhs_in_assignment", true); |
1631 *ok = false; | 1631 *ok = false; |
1632 return this->EmptyExpression(); | 1632 return this->EmptyExpression(); |
1633 } | 1633 } |
1634 | 1634 |
1635 if (strict_mode() == STRICT) { | 1635 if (strict_mode() == STRICT) { |
1636 // Assignment to eval or arguments is disallowed in strict mode. | 1636 // Assignment to eval or arguments is disallowed in strict mode. |
1637 this->CheckStrictModeLValue(expression, CHECK_OK); | 1637 this->CheckStrictModeLValue(expression, CHECK_OK); |
1638 } | 1638 } |
1639 expression = this->MarkExpressionAsLValue(expression); | 1639 expression = this->MarkExpressionAsLValue(expression); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1727 "accessor_get_set"); | 1727 "accessor_get_set"); |
1728 } | 1728 } |
1729 *ok = false; | 1729 *ok = false; |
1730 } | 1730 } |
1731 } | 1731 } |
1732 | 1732 |
1733 | 1733 |
1734 } } // v8::internal | 1734 } } // v8::internal |
1735 | 1735 |
1736 #endif // V8_PREPARSER_H | 1736 #endif // V8_PREPARSER_H |
OLD | NEW |