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

Side by Side Diff: runtime/vm/parser.h

Issue 10989010: Implement part header (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "vm/ast.h" 10 #include "vm/ast.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // The class or interface being parsed. 178 // The class or interface being parsed.
179 const Class& current_class() const; 179 const Class& current_class() const;
180 void set_current_class(const Class& value); 180 void set_current_class(const Class& value);
181 181
182 // Parsing a library or a regular source script. 182 // Parsing a library or a regular source script.
183 bool is_library_source() const { 183 bool is_library_source() const {
184 return (script_.kind() == RawScript::kScriptTag) || 184 return (script_.kind() == RawScript::kScriptTag) ||
185 (script_.kind() == RawScript::kLibraryTag); 185 (script_.kind() == RawScript::kLibraryTag);
186 } 186 }
187 187
188 bool is_part_source() const {
189 return script_.kind() == RawScript::kSourceTag;
190 }
191
188 // Parsing library patch script. 192 // Parsing library patch script.
189 bool is_patch_source() const { 193 bool is_patch_source() const {
190 return script_.kind() == RawScript::kPatchTag; 194 return script_.kind() == RawScript::kPatchTag;
191 } 195 }
192 196
193 intptr_t TokenPos() const { return tokens_iterator_.CurrentPosition(); } 197 intptr_t TokenPos() const { return tokens_iterator_.CurrentPosition(); }
194 inline Token::Kind CurrentToken(); 198 inline Token::Kind CurrentToken();
195 Token::Kind LookaheadToken(int num_tokens); 199 Token::Kind LookaheadToken(int num_tokens);
196 String* CurrentLiteral() const; 200 String* CurrentLiteral() const;
197 RawDouble* CurrentDoubleLiteral() const; 201 RawDouble* CurrentDoubleLiteral() const;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 293
290 // Support for parsing libraries. 294 // Support for parsing libraries.
291 Dart_Handle CallLibraryTagHandler(Dart_LibraryTag tag, 295 Dart_Handle CallLibraryTagHandler(Dart_LibraryTag tag,
292 intptr_t token_pos, 296 intptr_t token_pos,
293 const String& url); 297 const String& url);
294 void ParseIdentList(GrowableObjectArray* names); 298 void ParseIdentList(GrowableObjectArray* names);
295 void ParseLibraryDefinition(); 299 void ParseLibraryDefinition();
296 void ParseLibraryName(); 300 void ParseLibraryName();
297 void ParseLibraryImportExport(); 301 void ParseLibraryImportExport();
298 void ParseLibraryPart(); 302 void ParseLibraryPart();
303 void ParsePartHeader();
299 void ParseLibraryNameObsoleteSyntax(); 304 void ParseLibraryNameObsoleteSyntax();
300 void ParseLibraryImportObsoleteSyntax(); 305 void ParseLibraryImportObsoleteSyntax();
301 void ParseLibraryIncludeObsoleteSyntax(); 306 void ParseLibraryIncludeObsoleteSyntax();
302 307
303 void ResolveTypeFromClass(const Class& cls, 308 void ResolveTypeFromClass(const Class& cls,
304 ClassFinalizer::FinalizationKind finalization, 309 ClassFinalizer::FinalizationKind finalization,
305 AbstractType* type); 310 AbstractType* type);
306 RawAbstractType* ParseType(ClassFinalizer::FinalizationKind finalization); 311 RawAbstractType* ParseType(ClassFinalizer::FinalizationKind finalization);
307 void ParseTypeParameters(const Class& cls); 312 void ParseTypeParameters(const Class& cls);
308 RawAbstractTypeArguments* ParseTypeArguments( 313 RawAbstractTypeArguments* ParseTypeArguments(
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 612
608 // Allocate temporary only once per function. 613 // Allocate temporary only once per function.
609 LocalVariable* expression_temp_; 614 LocalVariable* expression_temp_;
610 615
611 DISALLOW_COPY_AND_ASSIGN(Parser); 616 DISALLOW_COPY_AND_ASSIGN(Parser);
612 }; 617 };
613 618
614 } // namespace dart 619 } // namespace dart
615 620
616 #endif // VM_PARSER_H_ 621 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698