| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 } | 781 } |
| 782 literal.Complete(); | 782 literal.Complete(); |
| 783 | 783 |
| 784 next_.location.end_pos = source_pos() - 1; | 784 next_.location.end_pos = source_pos() - 1; |
| 785 return true; | 785 return true; |
| 786 } | 786 } |
| 787 | 787 |
| 788 // ---------------------------------------------------------------------------- | 788 // ---------------------------------------------------------------------------- |
| 789 // Keyword Matcher | 789 // Keyword Matcher |
| 790 | 790 |
| 791 KeywordMatcher::FirstState KeywordMatcher::first_states_[] = { | 791 const KeywordMatcher::FirstState KeywordMatcher::first_states_[] = { |
| 792 { "break", KEYWORD_PREFIX, Token::BREAK }, | 792 { "break", KEYWORD_PREFIX, Token::BREAK }, |
| 793 { NULL, C, Token::ILLEGAL }, | 793 { NULL, C, Token::ILLEGAL }, |
| 794 { NULL, D, Token::ILLEGAL }, | 794 { NULL, D, Token::ILLEGAL }, |
| 795 { NULL, E, Token::ILLEGAL }, | 795 { NULL, E, Token::ILLEGAL }, |
| 796 { NULL, F, Token::ILLEGAL }, | 796 { NULL, F, Token::ILLEGAL }, |
| 797 { NULL, UNMATCHABLE, Token::ILLEGAL }, | 797 { NULL, UNMATCHABLE, Token::ILLEGAL }, |
| 798 { NULL, UNMATCHABLE, Token::ILLEGAL }, | 798 { NULL, UNMATCHABLE, Token::ILLEGAL }, |
| 799 { NULL, I, Token::ILLEGAL }, | 799 { NULL, I, Token::ILLEGAL }, |
| 800 { NULL, UNMATCHABLE, Token::ILLEGAL }, | 800 { NULL, UNMATCHABLE, Token::ILLEGAL }, |
| 801 { NULL, UNMATCHABLE, Token::ILLEGAL }, | 801 { NULL, UNMATCHABLE, Token::ILLEGAL }, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 if (MatchKeywordStart(input, "with", 1, Token::WITH)) return; | 957 if (MatchKeywordStart(input, "with", 1, Token::WITH)) return; |
| 958 break; | 958 break; |
| 959 case UNMATCHABLE: | 959 case UNMATCHABLE: |
| 960 break; | 960 break; |
| 961 } | 961 } |
| 962 // On fallthrough, it's a failure. | 962 // On fallthrough, it's a failure. |
| 963 state_ = UNMATCHABLE; | 963 state_ = UNMATCHABLE; |
| 964 } | 964 } |
| 965 | 965 |
| 966 } } // namespace v8::internal | 966 } } // namespace v8::internal |
| OLD | NEW |