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

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

Issue 24768004: Check types of case expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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') | runtime/vm/parser.cc » ('J')
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 "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 AstNode* LoadClosure(PrimaryNode* primary); 489 AstNode* LoadClosure(PrimaryNode* primary);
490 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name); 490 AstNode* CallGetter(intptr_t token_pos, AstNode* object, const String& name);
491 491
492 AstNode* ParseAssertStatement(); 492 AstNode* ParseAssertStatement();
493 AstNode* ParseJump(String* label_name); 493 AstNode* ParseJump(String* label_name);
494 AstNode* ParseIfStatement(String* label_name); 494 AstNode* ParseIfStatement(String* label_name);
495 AstNode* ParseWhileStatement(String* label_name); 495 AstNode* ParseWhileStatement(String* label_name);
496 AstNode* ParseDoWhileStatement(String* label_name); 496 AstNode* ParseDoWhileStatement(String* label_name);
497 AstNode* ParseForStatement(String* label_name); 497 AstNode* ParseForStatement(String* label_name);
498 AstNode* ParseForInStatement(intptr_t forin_pos, SourceLabel* label); 498 AstNode* ParseForInStatement(intptr_t forin_pos, SourceLabel* label);
499 void CheckCaseExpressions(const GrowableArray<LiteralNode*>& values);
499 CaseNode* ParseCaseClause(LocalVariable* switch_expr_value, 500 CaseNode* ParseCaseClause(LocalVariable* switch_expr_value,
501 GrowableArray<LiteralNode*>* case_expr_values,
500 SourceLabel* case_label); 502 SourceLabel* case_label);
501 AstNode* ParseSwitchStatement(String* label_name); 503 AstNode* ParseSwitchStatement(String* label_name);
502 504
503 // try/catch/finally parsing. 505 // try/catch/finally parsing.
504 void AddCatchParamsToScope(const CatchParamDesc& exception_param, 506 void AddCatchParamsToScope(const CatchParamDesc& exception_param,
505 const CatchParamDesc& stack_trace_param, 507 const CatchParamDesc& stack_trace_param,
506 LocalScope* scope); 508 LocalScope* scope);
507 // Parse finally block and create an AST for it. 509 // Parse finally block and create an AST for it.
508 SequenceNode* ParseFinallyBlock(); 510 SequenceNode* ParseFinallyBlock();
509 // Adds try block to the list of try blocks seen so far. 511 // Adds try block to the list of try blocks seen so far.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 intptr_t last_used_try_index_; 716 intptr_t last_used_try_index_;
715 717
716 bool unregister_pending_function_; 718 bool unregister_pending_function_;
717 719
718 DISALLOW_COPY_AND_ASSIGN(Parser); 720 DISALLOW_COPY_AND_ASSIGN(Parser);
719 }; 721 };
720 722
721 } // namespace dart 723 } // namespace dart
722 724
723 #endif // VM_PARSER_H_ 725 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698