001    package com.google.dart.compiler.backend.js.ast;
002    
003    import org.jetbrains.annotations.NotNull;
004    
005    public class ChameleonJsExpression implements JsExpression {
006        private JsExpression expression;
007    
008        public ChameleonJsExpression(JsExpression initialExpression) {
009            expression = initialExpression;
010        }
011    
012        public ChameleonJsExpression() {
013        }
014    
015        public void resolve(JsExpression expression) {
016            this.expression = expression;
017        }
018    
019        @Override
020        public boolean isLeaf() {
021            return expression.isLeaf();
022        }
023    
024        @Override
025        @NotNull
026        public JsStatement makeStmt() {
027            return expression.makeStmt();
028        }
029    
030        @Override
031        public void accept(JsVisitor visitor) {
032            expression.accept(visitor);
033        }
034    
035        @Override
036        public void acceptChildren(JsVisitor visitor) {
037            expression.acceptChildren(visitor);
038        }
039    
040        @Override
041        public Object getSource() {
042            return expression.getSource();
043        }
044    
045        @Override
046        public void setSource(Object info) {
047            expression.setSource(info);
048        }
049    
050        @Override
051        public JsExpression source(Object info) {
052            return expression.source(info);
053        }
054    }