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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 return Statement(kUseStrictExpressionStatement); | 437 return Statement(kUseStrictExpressionStatement); |
438 } | 438 } |
439 if (expression.IsStringLiteral()) { | 439 if (expression.IsStringLiteral()) { |
440 return Statement(kStringLiteralExpressionStatement); | 440 return Statement(kStringLiteralExpressionStatement); |
441 } | 441 } |
442 } | 442 } |
443 return Default(); | 443 return Default(); |
444 } | 444 } |
445 | 445 |
446 bool IsStringLiteral() { | 446 bool IsStringLiteral() { |
447 return code_ != kUnknownStatement; | 447 return code_ == kStringLiteralExpressionStatement; |
448 } | 448 } |
449 | 449 |
450 bool IsUseStrictLiteral() { | 450 bool IsUseStrictLiteral() { |
451 return code_ == kUseStrictExpressionStatement; | 451 return code_ == kUseStrictExpressionStatement; |
452 } | 452 } |
453 | 453 |
454 bool IsFunctionDeclaration() { | 454 bool IsFunctionDeclaration() { |
455 return code_ == kFunctionDeclaration; | 455 return code_ == kFunctionDeclaration; |
456 } | 456 } |
457 | 457 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 bool allow_generators_; | 689 bool allow_generators_; |
690 bool allow_for_of_; | 690 bool allow_for_of_; |
691 bool parenthesized_function_; | 691 bool parenthesized_function_; |
692 | 692 |
693 friend class i::ObjectLiteralChecker<PreParser>; | 693 friend class i::ObjectLiteralChecker<PreParser>; |
694 }; | 694 }; |
695 | 695 |
696 } } // v8::preparser | 696 } } // v8::preparser |
697 | 697 |
698 #endif // V8_PREPARSER_H | 698 #endif // V8_PREPARSER_H |
OLD | NEW |