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 * The context in which a JsNode visitation occurs. This represents the set of
009 * possible operations a JsVisitor subclass can perform on the currently visited
010 * node.
011 */
012 public interface JsContext {
013 boolean canInsert();
014
015 boolean canRemove();
016
017 void insertAfter(JsNode node);
018
019 void insertBefore(JsNode node);
020
021 boolean isLvalue();
022
023 void removeMe();
024
025 void replaceMe(JsNode node);
026 }