Пример #1
0
  @NotNull
  @Override
  public JsFunction deepCopy() {
    JsFunction functionCopy = new JsFunction(scope.getParent(), scope.getDescription(), name);
    functionCopy.getScope().copyOwnNames(scope);
    functionCopy.setBody(body.deepCopy());
    functionCopy.params = AstUtil.deepCopy(params);

    return functionCopy.withMetadataFrom(this);
  }
Пример #2
0
 @NotNull
 private JsInvocation namespaceCreateMethodInvocation() {
   return AstUtil.newInvocation(context().namer().namespaceCreationMethodReference());
 }
Пример #3
0
 /*package*/ TemporaryVariable(
     @NotNull JsName temporaryName, @NotNull JsExpression initExpression) {
   this.variableName = temporaryName;
   this.assignmentExpression = AstUtil.newAssignment(variableName.makeRef(), initExpression);
 }