| 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 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3575 Vector<const char*>::empty()); | 3575 Vector<const char*>::empty()); |
| 3576 case Token::STRING: | 3576 case Token::STRING: |
| 3577 return ReportMessage("unexpected_token_string", | 3577 return ReportMessage("unexpected_token_string", |
| 3578 Vector<const char*>::empty()); | 3578 Vector<const char*>::empty()); |
| 3579 case Token::IDENTIFIER: | 3579 case Token::IDENTIFIER: |
| 3580 return ReportMessage("unexpected_token_identifier", | 3580 return ReportMessage("unexpected_token_identifier", |
| 3581 Vector<const char*>::empty()); | 3581 Vector<const char*>::empty()); |
| 3582 case Token::FUTURE_RESERVED_WORD: | 3582 case Token::FUTURE_RESERVED_WORD: |
| 3583 return ReportMessage("unexpected_reserved", | 3583 return ReportMessage("unexpected_reserved", |
| 3584 Vector<const char*>::empty()); | 3584 Vector<const char*>::empty()); |
| 3585 case Token::YIELD: |
| 3585 case Token::FUTURE_STRICT_RESERVED_WORD: | 3586 case Token::FUTURE_STRICT_RESERVED_WORD: |
| 3586 return ReportMessage(top_scope_->is_classic_mode() ? | 3587 return ReportMessage(top_scope_->is_classic_mode() ? |
| 3587 "unexpected_token_identifier" : | 3588 "unexpected_token_identifier" : |
| 3588 "unexpected_strict_reserved", | 3589 "unexpected_strict_reserved", |
| 3589 Vector<const char*>::empty()); | 3590 Vector<const char*>::empty()); |
| 3590 default: | 3591 default: |
| 3591 const char* name = Token::String(token); | 3592 const char* name = Token::String(token); |
| 3592 ASSERT(name != NULL); | 3593 ASSERT(name != NULL); |
| 3593 ReportMessage("unexpected_token", Vector<const char*>(&name, 1)); | 3594 ReportMessage("unexpected_token", Vector<const char*>(&name, 1)); |
| 3594 } | 3595 } |
| (...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6002 ASSERT(info->isolate()->has_pending_exception()); | 6003 ASSERT(info->isolate()->has_pending_exception()); |
| 6003 } else { | 6004 } else { |
| 6004 result = parser.ParseProgram(); | 6005 result = parser.ParseProgram(); |
| 6005 } | 6006 } |
| 6006 } | 6007 } |
| 6007 info->SetFunction(result); | 6008 info->SetFunction(result); |
| 6008 return (result != NULL); | 6009 return (result != NULL); |
| 6009 } | 6010 } |
| 6010 | 6011 |
| 6011 } } // namespace v8::internal | 6012 } } // namespace v8::internal |
| OLD | NEW |