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 /**
008 * One independently loadable fragment of a {@link JsProgram}.
009 */
010 public class JsProgramFragment extends SourceInfoAwareJsNode {
011 private final JsGlobalBlock globalBlock;
012
013 public JsProgramFragment() {
014 globalBlock = new JsGlobalBlock();
015 }
016
017 public JsBlock getGlobalBlock() {
018 return globalBlock;
019 }
020
021 @Override
022 public void accept(JsVisitor v) {
023 v.visitProgramFragment(this);
024 }
025
026 @Override
027 public void acceptChildren(JsVisitor visitor) {
028 visitor.accept(globalBlock);
029 }
030 }