Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: test/cctest/test-parsing.cc

Issue 220473014: Make stray 'return' an early error (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 "do {} while (false)", 1473 "do {} while (false)",
1474 "for (;;) ;", 1474 "for (;;) ;",
1475 "for (;;) {}", 1475 "for (;;) {}",
1476 "for (;;) 12", 1476 "for (;;) 12",
1477 "continue", 1477 "continue",
1478 "continue label", 1478 "continue label",
1479 "continue\nlabel", 1479 "continue\nlabel",
1480 "break", 1480 "break",
1481 "break label", 1481 "break label",
1482 "break\nlabel", 1482 "break\nlabel",
1483 "return", 1483 // TODO(marja): activate once parsing 'return' is merged into ParserBase.
1484 "return 12", 1484 // "return",
1485 "return\n12", 1485 // "return 12",
1486 // "return\n12",
1486 "with ({}) ;", 1487 "with ({}) ;",
1487 "with ({}) {}", 1488 "with ({}) {}",
1488 "with ({}) 12", 1489 "with ({}) 12",
1489 "switch ({}) { default: }" 1490 "switch ({}) { default: }"
1490 "label3: " 1491 "label3: "
1491 "throw", 1492 "throw",
1492 "throw 12", 1493 "throw 12",
1493 "throw\n12", 1494 "throw\n12",
1494 "try {} catch(e) {}", 1495 "try {} catch(e) {}",
1495 "try {} finally {}", 1496 "try {} finally {}",
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); 2597 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError);
2597 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, 2598 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment,
2598 kError); 2599 kError);
2599 2600
2600 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); 2601 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess);
2601 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); 2602 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError);
2602 2603
2603 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); 2604 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess);
2604 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); 2605 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError);
2605 } 2606 }
OLDNEW
« src/runtime.cc ('K') | « src/runtime.cc ('k') | test/mjsunit/debug-stepout-scope-part2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698