OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // SourceElements :: | 97 // SourceElements :: |
98 // (Statement)* <end_token> | 98 // (Statement)* <end_token> |
99 | 99 |
100 while (peek() != end_token) { | 100 while (peek() != end_token) { |
101 ParseStatement(CHECK_OK); | 101 ParseStatement(CHECK_OK); |
102 } | 102 } |
103 return kUnknownSourceElements; | 103 return kUnknownSourceElements; |
104 } | 104 } |
105 | 105 |
106 | 106 |
107 PreParser::PreParser::Statement PreParser::ParseStatement(bool* ok) { | 107 PreParser::Statement PreParser::ParseStatement(bool* ok) { |
108 // Statement :: | 108 // Statement :: |
109 // Block | 109 // Block |
110 // VariableStatement | 110 // VariableStatement |
111 // EmptyStatement | 111 // EmptyStatement |
112 // ExpressionStatement | 112 // ExpressionStatement |
113 // IfStatement | 113 // IfStatement |
114 // IterationStatement | 114 // IterationStatement |
115 // ContinueStatement | 115 // ContinueStatement |
116 // BreakStatement | 116 // BreakStatement |
117 // ReturnStatement | 117 // ReturnStatement |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 if (scanner_->literal_length() == 3) { | 1175 if (scanner_->literal_length() == 3) { |
1176 const char* token = scanner_->literal_string(); | 1176 const char* token = scanner_->literal_string(); |
1177 *is_get = strncmp(token, "get", 3) == 0; | 1177 *is_get = strncmp(token, "get", 3) == 0; |
1178 *is_set = !*is_get && strncmp(token, "set", 3) == 0; | 1178 *is_set = !*is_get && strncmp(token, "set", 3) == 0; |
1179 } | 1179 } |
1180 return GetIdentifierSymbol(); | 1180 return GetIdentifierSymbol(); |
1181 } | 1181 } |
1182 | 1182 |
1183 #undef CHECK_OK | 1183 #undef CHECK_OK |
1184 } } // v8::preparser | 1184 } } // v8::preparser |
OLD | NEW |