| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 PreParser::Statement PreParser::ParseDoWhileStatement(bool* ok) { | 533 PreParser::Statement PreParser::ParseDoWhileStatement(bool* ok) { |
| 534 // DoStatement :: | 534 // DoStatement :: |
| 535 // 'do' Statement 'while' '(' Expression ')' ';' | 535 // 'do' Statement 'while' '(' Expression ')' ';' |
| 536 | 536 |
| 537 Expect(i::Token::DO, CHECK_OK); | 537 Expect(i::Token::DO, CHECK_OK); |
| 538 ParseStatement(CHECK_OK); | 538 ParseStatement(CHECK_OK); |
| 539 Expect(i::Token::WHILE, CHECK_OK); | 539 Expect(i::Token::WHILE, CHECK_OK); |
| 540 Expect(i::Token::LPAREN, CHECK_OK); | 540 Expect(i::Token::LPAREN, CHECK_OK); |
| 541 ParseExpression(true, CHECK_OK); | 541 ParseExpression(true, CHECK_OK); |
| 542 Expect(i::Token::RPAREN, ok); | 542 Expect(i::Token::RPAREN, ok); |
| 543 if (peek() == i::Token::SEMICOLON) Consume(i::Token::SEMICOLON); |
| 543 return Statement::Default(); | 544 return Statement::Default(); |
| 544 } | 545 } |
| 545 | 546 |
| 546 | 547 |
| 547 PreParser::Statement PreParser::ParseWhileStatement(bool* ok) { | 548 PreParser::Statement PreParser::ParseWhileStatement(bool* ok) { |
| 548 // WhileStatement :: | 549 // WhileStatement :: |
| 549 // 'while' '(' Expression ')' Statement | 550 // 'while' '(' Expression ')' Statement |
| 550 | 551 |
| 551 Expect(i::Token::WHILE, CHECK_OK); | 552 Expect(i::Token::WHILE, CHECK_OK); |
| 552 Expect(i::Token::LPAREN, CHECK_OK); | 553 Expect(i::Token::LPAREN, CHECK_OK); |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 backing_store_.Add(static_cast<byte>((ascii_length >> 14) | 0x80u)); | 1671 backing_store_.Add(static_cast<byte>((ascii_length >> 14) | 0x80u)); |
| 1671 } | 1672 } |
| 1672 backing_store_.Add(static_cast<byte>((ascii_length >> 7) | 0x80u)); | 1673 backing_store_.Add(static_cast<byte>((ascii_length >> 7) | 0x80u)); |
| 1673 } | 1674 } |
| 1674 backing_store_.Add(static_cast<byte>(ascii_length & 0x7f)); | 1675 backing_store_.Add(static_cast<byte>(ascii_length & 0x7f)); |
| 1675 | 1676 |
| 1676 backing_store_.AddBlock(bytes); | 1677 backing_store_.AddBlock(bytes); |
| 1677 return backing_store_.EndSequence().start(); | 1678 return backing_store_.EndSequence().start(); |
| 1678 } | 1679 } |
| 1679 } } // v8::preparser | 1680 } } // v8::preparser |
| OLD | NEW |