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

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

Issue 34413007: Implement type checks for switch expression (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/scopes.h » ('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 RawType* CheckCaseExpressions(const GrowableArray<LiteralNode*>& values);
500 CaseNode* ParseCaseClause(LocalVariable* switch_expr_value, 500 CaseNode* ParseCaseClause(LocalVariable* switch_expr_value,
501 GrowableArray<LiteralNode*>* case_expr_values, 501 GrowableArray<LiteralNode*>* case_expr_values,
502 SourceLabel* case_label); 502 SourceLabel* case_label);
503 AstNode* ParseSwitchStatement(String* label_name); 503 AstNode* ParseSwitchStatement(String* label_name);
504 504
505 // try/catch/finally parsing. 505 // try/catch/finally parsing.
506 void AddCatchParamsToScope(const CatchParamDesc& exception_param, 506 void AddCatchParamsToScope(const CatchParamDesc& exception_param,
507 const CatchParamDesc& stack_trace_param, 507 const CatchParamDesc& stack_trace_param,
508 LocalScope* scope); 508 LocalScope* scope);
509 // Parse finally block and create an AST for it. 509 // Parse finally block and create an AST for it.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 intptr_t last_used_try_index_; 718 intptr_t last_used_try_index_;
719 719
720 bool unregister_pending_function_; 720 bool unregister_pending_function_;
721 721
722 DISALLOW_COPY_AND_ASSIGN(Parser); 722 DISALLOW_COPY_AND_ASSIGN(Parser);
723 }; 723 };
724 724
725 } // namespace dart 725 } // namespace dart
726 726
727 #endif // VM_PARSER_H_ 727 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698