Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 #include <stdlib.h> | 28 #include <stdlib.h> |
| 29 #include <stdarg.h> | 29 #include <stdarg.h> |
| 30 #include <stdio.h> | 30 #include <stdio.h> |
| 31 #include <string.h> | 31 #include <string.h> |
| 32 | 32 |
| 33 #include "../include/v8stdint.h" | 33 #include "../include/v8stdint.h" |
| 34 #include "../include/v8-preparser.h" | 34 #include "../include/v8-preparser.h" |
| 35 | 35 |
| 36 #include "../src/preparse-data-format.h" | 36 #include "../src/preparse-data-format.h" |
| 37 | 37 |
| 38 namespace v8 { | |
| 39 namespace internal { | |
| 40 bool FLAG_harmony_block_scoping = false; | |
| 41 } } // namespace v8::internal | |
|
Lasse Reichstein
2011/08/12 08:08:33
Put this in preparser-api.cc.
That's where other "
Steven
2011/08/16 09:05:32
It's now injected into the scanner and preparser.
| |
| 42 | |
| 38 namespace i = v8::internal; | 43 namespace i = v8::internal; |
| 39 | 44 |
| 40 // This file is only used for testing the stand-alone preparser | 45 // This file is only used for testing the stand-alone preparser |
| 41 // library. | 46 // library. |
| 42 // The first argument must be the path of a JavaScript source file, or | 47 // The first argument must be the path of a JavaScript source file, or |
| 43 // the flags "-e" and the next argument is then the source of a JavaScript | 48 // the flags "-e" and the next argument is then the source of a JavaScript |
| 44 // program. | 49 // program. |
| 45 // Optionally this can be followed by the word "throws" (case sensitive), | 50 // Optionally this can be followed by the word "throws" (case sensitive), |
| 46 // which signals that the parsing is expected to throw - the default is | 51 // which signals that the parsing is expected to throw - the default is |
| 47 // to expect the parsing to not throw. | 52 // to expect the parsing to not throw. |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 if (data.stack_overflow()) { | 375 if (data.stack_overflow()) { |
| 371 fail(&data, "ERROR: Stack overflow\n"); | 376 fail(&data, "ERROR: Stack overflow\n"); |
| 372 } | 377 } |
| 373 | 378 |
| 374 // Check that the expected exception is thrown, if an exception is | 379 // Check that the expected exception is thrown, if an exception is |
| 375 // expected. | 380 // expected. |
| 376 CheckException(&data, &expects); | 381 CheckException(&data, &expects); |
| 377 | 382 |
| 378 return EXIT_SUCCESS; | 383 return EXIT_SUCCESS; |
| 379 } | 384 } |
| OLD | NEW |