KJS: relocate com.google.dart.compiler -> org.jetbrains.kotlin

This commit is contained in:
Zalim Bashorov
2017-01-03 18:10:34 +03:00
parent cb4c3ed686
commit 316da8331f
251 changed files with 622 additions and 544 deletions
@@ -1,20 +0,0 @@
package com.google.dart.compiler.backend.js.ast;
import com.google.dart.compiler.backend.js.JsToStringGenerationVisitor;
import com.google.dart.compiler.backend.js.ast.metadata.HasMetadata;
import com.google.dart.compiler.util.TextOutputImpl;
abstract class AbstractNode extends HasMetadata implements JsNode {
@Override
public String toString() {
TextOutputImpl out = new TextOutputImpl();
new JsToStringGenerationVisitor(out).accept(this);
return out.toString();
}
protected <T extends HasMetadata> T withMetadataFrom(T other) {
this.copyMetadataFrom(other);
//noinspection unchecked
return (T) this;
}
}
@@ -1,10 +0,0 @@
package com.google.dart.compiler.backend.js.ast;
import org.jetbrains.annotations.NotNull;
public abstract class RecursiveJsVisitor extends JsVisitor {
@Override
protected void visitElement(@NotNull JsNode node) {
node.acceptChildren(this);
}
}
@@ -1,25 +0,0 @@
package com.google.dart.compiler.backend.js.ast;
public abstract class SourceInfoAwareJsNode extends AbstractNode {
private Object source;
@Override
public Object getSource() {
return source;
}
@Override
public void setSource(Object info) {
source = info;
}
@Override
public void acceptChildren(JsVisitor visitor) {
}
@Override
public JsNode source(Object info) {
source = info;
return this;
}
}
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler;
package org.jetbrains.kotlin.js;
import java.io.IOException;
import java.io.Reader;
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js;
package org.jetbrains.kotlin.js.backend;
import com.google.dart.compiler.backend.js.ast.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.js.backend.ast.*;
/**
* Searches for method invocations in constructor expressions that would not
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js;
package org.jetbrains.kotlin.js.backend;
import com.google.dart.compiler.backend.js.ast.*;
import com.google.dart.compiler.backend.js.ast.JsExpressionStatement;
import org.jetbrains.kotlin.js.backend.ast.*;
import org.jetbrains.kotlin.js.backend.ast.JsExpressionStatement;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js;
package org.jetbrains.kotlin.js.backend;
import com.google.dart.compiler.backend.js.ast.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.js.backend.ast.*;
/**
* Precedence indices from "JavaScript - The Definitive Guide" 4th Edition (page
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js;
package org.jetbrains.kotlin.js.backend;
import com.google.dart.compiler.backend.js.ast.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.js.backend.ast.*;
/**
* Determines if a statement at the end of a block requires a semicolon.
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js;
package org.jetbrains.kotlin.js.backend;
import gnu.trove.THashSet;
@@ -2,11 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js;
package org.jetbrains.kotlin.js.backend;
import com.google.dart.compiler.backend.js.ast.*;
import com.google.dart.compiler.backend.js.ast.JsVars.JsVar;
import com.google.dart.compiler.util.TextOutput;
import org.jetbrains.kotlin.js.backend.ast.*;
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsDoubleLiteral;
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsIntLiteral;
import org.jetbrains.kotlin.js.backend.ast.JsVars.JsVar;
import org.jetbrains.kotlin.js.util.TextOutput;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
@@ -15,9 +17,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsDoubleLiteral;
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsIntLiteral;
/**
* Produces text output from a JavaScript AST.
*/
@@ -0,0 +1,36 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.kotlin.js.backend.JsToStringGenerationVisitor;
import org.jetbrains.kotlin.js.backend.ast.metadata.HasMetadata;
import org.jetbrains.kotlin.js.util.TextOutputImpl;
abstract class AbstractNode extends HasMetadata implements JsNode {
@Override
public String toString() {
TextOutputImpl out = new TextOutputImpl();
new JsToStringGenerationVisitor(out).accept(this);
return out.toString();
}
protected <T extends HasMetadata> T withMetadataFrom(T other) {
this.copyMetadataFrom(other);
//noinspection unchecked
return (T) this;
}
}
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import java.util.List;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
/**
* Implemented by JavaScript objects with conditional execution.
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.common.HasSymbol;
import org.jetbrains.kotlin.js.common.HasSymbol;
/**
* Implemented by JavaScript objects that have a name.
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
/**
* Represents the operator in a JavaScript binary operation.
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import com.intellij.util.SmartList;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
public final class JsConditional extends JsExpression {
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.Nullable;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -1,4 +1,20 @@
package com.google.dart.compiler.backend.js.ast;
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast
package org.jetbrains.kotlin.js.backend.ast
object JsEmpty : SourceInfoAwareJsNode(), JsStatement {
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
public class JsForIn extends SourceInfoAwareJsNode implements JsStatement {
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.common.Symbol;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.common.Symbol;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.backend.js.ast.metadata.HasMetadata;
import com.google.dart.compiler.common.Symbol;
import org.jetbrains.kotlin.js.backend.ast.metadata.HasMetadata;
import org.jetbrains.kotlin.js.common.Symbol;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.common.Symbol;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
public final class JsNullLiteral extends JsLiteral.JsValueLiteral {
JsNullLiteral() {
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
public abstract class JsNumberLiteral extends JsLiteral.JsValueLiteral {
public static final JsIntLiteral ZERO = new JsIntLiteral(0);
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
public interface JsOperator {
int INFIX = 0x02;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.common.Symbol;
import org.jetbrains.kotlin.js.common.Symbol;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
public final class JsPostfixOperation extends JsUnaryOperation {
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
public final class JsPrefixOperation extends JsUnaryOperation {
@@ -2,18 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import gnu.trove.TDoubleObjectHashMap;
import gnu.trove.THashMap;
import gnu.trove.TIntObjectHashMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsDoubleLiteral;
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsIntLiteral;
import java.util.Map;
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsDoubleLiteral;
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsIntLiteral;
/**
* A JavaScript program.
*/
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
public final class JsRegExp extends JsLiteral.JsValueLiteral {
private String flags;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.backend.js.JsReservedIdentifiers;
import org.jetbrains.kotlin.js.backend.JsReservedIdentifiers;
import org.jetbrains.annotations.NotNull;
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.Maps;
import org.jetbrains.kotlin.js.util.Maps;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
public final class JsStringLiteral extends JsLiteral.JsValueLiteral {
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
public class JsThrow extends SourceInfoAwareJsNode implements JsStatement {
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
public abstract class JsUnaryOperation extends JsExpression {
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
/**
* A JavaScript unary operator.
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.common.Symbol;
import org.jetbrains.kotlin.js.util.AstUtil;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast
package org.jetbrains.kotlin.js.backend.ast
import com.google.dart.compiler.backend.js.ast.JsVars.JsVar
import org.jetbrains.kotlin.js.backend.ast.JsVars.JsVar
abstract class JsVisitor {
open fun <T : JsNode?> accept(node: T) {
@@ -12,7 +12,7 @@
* the License.
*/
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
/**
* Taken from GWT project with modifications.
@@ -12,7 +12,7 @@
* the License.
*/
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
/**
* Taken from GWT project with modifications.
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.backend.js.ast;
package org.jetbrains.kotlin.js.backend.ast;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.kotlin.js.util.AstUtil;
import org.jetbrains.annotations.NotNull;
/**
@@ -0,0 +1,26 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
public abstract class RecursiveJsVisitor extends JsVisitor {
@Override
protected void visitElement(@NotNull JsNode node) {
node.acceptChildren(this);
}
}
@@ -0,0 +1,41 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.backend.ast;
public abstract class SourceInfoAwareJsNode extends AbstractNode {
private Object source;
@Override
public Object getSource() {
return source;
}
@Override
public void setSource(Object info) {
source = info;
}
@Override
public void acceptChildren(JsVisitor visitor) {
}
@Override
public JsNode source(Object info) {
source = info;
return this;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.dart.compiler.backend.js.ast
package org.jetbrains.kotlin.js.backend.ast
import java.util.Stack
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.dart.compiler.backend.js.ast.metadata
package org.jetbrains.kotlin.js.backend.ast.metadata
abstract class HasMetadata {
private val metadata: MutableMap<String, Any?> = hashMapOf()
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.google.dart.compiler.backend.js.ast.metadata
package org.jetbrains.kotlin.js.backend.ast.metadata
import kotlin.reflect.KProperty
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,14 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JvmName("MetadataProperties")
package com.google.dart.compiler.backend.js.ast.metadata
package org.jetbrains.kotlin.js.backend.ast.metadata
import com.google.dart.compiler.backend.js.ast.*
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.js.backend.ast.*
import org.jetbrains.kotlin.resolve.inline.InlineStrategy
import org.jetbrains.kotlin.types.KotlinType
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.common;
package org.jetbrains.kotlin.js.common;
public interface HasSymbol {
/**
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.common;
package org.jetbrains.kotlin.js.common;
import com.google.dart.compiler.Source;
import org.jetbrains.kotlin.js.Source;
import java.io.Serializable;
@@ -1,6 +1,22 @@
package com.google.dart.compiler.common;
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.google.dart.compiler.Source;
package org.jetbrains.kotlin.js.common;
import org.jetbrains.kotlin.js.Source;
public class SourceInfoImpl implements SourceInfo {
protected Source source = null;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.common;
package org.jetbrains.kotlin.js.common;
public interface Symbol {
}
@@ -2,12 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.util;
package org.jetbrains.kotlin.js.util;
import com.google.dart.compiler.backend.js.ast.*;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.js.backend.ast.JsBinaryOperation;
import org.jetbrains.kotlin.js.backend.ast.JsBinaryOperator;
import org.jetbrains.kotlin.js.backend.ast.JsExpression;
import org.jetbrains.kotlin.js.backend.ast.JsNode;
import java.util.ArrayList;
import java.util.List;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.util;
package org.jetbrains.kotlin.js.util;
import java.util.Collections;
import java.util.HashMap;
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.util;
package org.jetbrains.kotlin.js.util;
/**
* Interface used for printing text output.
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.util;
package org.jetbrains.kotlin.js.util;
import java.util.Arrays;