001    // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
002    // for details. All rights reserved. Use of this source code is governed by a
003    // BSD-style license that can be found in the LICENSE file.
004    
005    package com.google.dart.compiler.backend.js.ast;
006    
007    public class JsThrow extends SourceInfoAwareJsNode implements JsStatement {
008        private JsExpression expression;
009    
010        public JsThrow() {
011        }
012    
013        public JsThrow(JsExpression expression) {
014            this.expression = expression;
015        }
016    
017        public JsExpression getExpression() {
018            return expression;
019        }
020    
021        public void setExpression(JsExpression expression) {
022            this.expression = expression;
023        }
024    
025        @Override
026        public void accept(JsVisitor v) {
027            v.visitThrow(this);
028        }
029    
030        @Override
031        public void acceptChildren(JsVisitor visitor) {
032            visitor.accept(expression);
033        }
034    }