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

Unified Diff: pkg/kernel/lib/ast.dart

Issue 2750013002: [kernel] Debugging of switch statement (Closed)
Patch Set: Addressed comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/ast.dart
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 220878e634f487b430237ee6203ddd5013345595..9d6d5cdd073424bf9d2999e6e6673af3d96dd8bc 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -3080,22 +3080,26 @@ class SwitchStatement extends Statement {
/// This is a potential target of [ContinueSwitchStatement].
class SwitchCase extends TreeNode {
final List<Expression> expressions;
+ final List<int> expressionOffsets;
Statement body;
bool isDefault;
- SwitchCase(this.expressions, this.body, {this.isDefault: false}) {
+ SwitchCase(this.expressions, this.expressionOffsets, this.body,
+ {this.isDefault: false}) {
setParents(expressions, this);
body?.parent = this;
}
SwitchCase.defaultCase(this.body)
: isDefault = true,
- expressions = <Expression>[] {
+ expressions = <Expression>[],
+ expressionOffsets = <int>[] {
body?.parent = this;
}
SwitchCase.empty()
: expressions = <Expression>[],
+ expressionOffsets = <int>[],
body = null,
isDefault = false;
« no previous file with comments | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698