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

Side by Side Diff: compiler/java/com/google/dart/compiler/ast/DartCatchBlock.java

Issue 11418186: Issue 5359. Highlight 'on' in try-catch statement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('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 package com.google.dart.compiler.ast; 5 package com.google.dart.compiler.ast;
6 6
7 /** 7 /**
8 * Represents a Dart 'catch' block. 8 * Represents a Dart 'catch' block.
9 */ 9 */
10 public class DartCatchBlock extends DartStatement { 10 public class DartCatchBlock extends DartStatement {
11 private DartParameter exception; 11 private final int onTokenOffset;
12 private DartParameter stackTrace; 12 private final DartParameter exception;
13 private DartBlock block; 13 private final DartParameter stackTrace;
14 private final DartBlock block;
14 15
15 public DartCatchBlock(DartBlock block, 16 public DartCatchBlock(DartBlock block,
17 int onTokenOffset,
16 DartParameter exception, 18 DartParameter exception,
17 DartParameter stackTrace) { 19 DartParameter stackTrace) {
18 this.block = becomeParentOf(block); 20 this.block = becomeParentOf(block);
21 this.onTokenOffset = onTokenOffset;
19 this.exception = becomeParentOf(exception); 22 this.exception = becomeParentOf(exception);
20 this.stackTrace = becomeParentOf(stackTrace); 23 this.stackTrace = becomeParentOf(stackTrace);
21 } 24 }
22 25
26 public int getOnTokenOffset() {
27 return onTokenOffset;
28 }
29
23 public DartParameter getException() { 30 public DartParameter getException() {
24 return exception; 31 return exception;
25 } 32 }
26 33
27 public DartParameter getStackTrace() { 34 public DartParameter getStackTrace() {
28 return stackTrace; 35 return stackTrace;
29 } 36 }
30 37
31 public DartBlock getBlock() { 38 public DartBlock getBlock() {
32 return block; 39 return block;
33 } 40 }
34 41
35 @Override 42 @Override
36 public void visitChildren(ASTVisitor<?> visitor) { 43 public void visitChildren(ASTVisitor<?> visitor) {
37 safelyVisitChild(exception, visitor); 44 safelyVisitChild(exception, visitor);
38 safelyVisitChild(stackTrace, visitor); 45 safelyVisitChild(stackTrace, visitor);
39 safelyVisitChild(block, visitor); 46 safelyVisitChild(block, visitor);
40 } 47 }
41 48
42 @Override 49 @Override
43 public <R> R accept(ASTVisitor<R> visitor) { 50 public <R> R accept(ASTVisitor<R> visitor) {
44 return visitor.visitCatchBlock(this); 51 return visitor.visitCatchBlock(this);
45 } 52 }
46 } 53 }
OLDNEW
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698