Package com.google.javascript.jscomp.GlobalNamespace

Examples of com.google.javascript.jscomp.GlobalNamespace.AstChange


              case DIRECT_GET:
              case ALIASING_GET:
                Node newNode = alias.node.cloneTree();
                Node node = ref.node;
                node.getParent().replaceChild(node, newNode);
                newNodes.add(new AstChange(ref.module, ref.scope, newNode));
                name.removeRef(ref);
                break;
              default:
                throw new IllegalStateException();
            }
View Full Code Here


          }
          Preconditions.checkState(target.isGetProp() || target.isName());
          target.getParent().replaceChild(target, value.cloneTree());
          prop.removeRef(ref);
          // Rescan the expression root.
          newNodes.add(new AstChange(ref.module, ref.scope, ref.node));
        }
      }
    }
  }
View Full Code Here

          ReferenceCollectingCallback.Reference aliasRef =
              aliasRefs.references.get(i);

          Node newNode = alias.node.cloneTree();
          aliasRef.getParent().replaceChild(aliasRef.getNode(), newNode);
          newNodes.add(new AstChange(
              getRefModule(aliasRef), aliasRef.getScope(), newNode));
        }

        // just set the original alias to null.
        aliasParent.replaceChild(alias.node, IR.nullNode());
View Full Code Here

TOP

Related Classes of com.google.javascript.jscomp.GlobalNamespace.AstChange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.