diff --git a/js/js.ast/src/org/jetbrains/kotlin/js/common/SourceInfo.java b/js/js.ast/src/org/jetbrains/kotlin/js/common/SourceInfo.java deleted file mode 100644 index 9e793a496fb..00000000000 --- a/js/js.ast/src/org/jetbrains/kotlin/js/common/SourceInfo.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// 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 org.jetbrains.kotlin.js.common; - -import org.jetbrains.kotlin.js.Source; - -import java.io.Serializable; - -/** - * Tracks file and line information for AST nodes. - */ -public interface SourceInfo extends Serializable { - - /** - * The source code provider. - */ - Source getSource(); - - /** - * @return A 1-based line number into the original source file indicating - * where the source fragment begins. - */ - int getLine(); - - /** - * @return A 1-based column number into the original source file indicating - * where the source fragment begins. - */ - int getColumn(); - - /** - * Returns the character index into the original source file indicating - * where the source fragment corresponding to this node begins. - * - *

- * The parser supplies useful well-defined source ranges to the nodes it creates. - * - * @return the 0-based character index, or -1 - * if no source startPosition information is recorded for this node - * @see #getLength() - * @see HasSourceInfo#setSourceLocation(Source, int, int, int, int) - */ - int getStart(); - - /** - * Returns the length in characters of the original source file indicating - * where the source fragment corresponding to this node ends. - *

- * The parser supplies useful well-defined source ranges to the nodes it creates. - * - * @return a (possibly 0) length, or 0 - * if no source source position information is recorded for this node - * @see #getStart() - * @see HasSourceInfo#setSourceLocation(Source, int, int, int, int) - */ - int getLength(); -} diff --git a/js/js.ast/src/org/jetbrains/kotlin/js/common/SourceInfoImpl.java b/js/js.ast/src/org/jetbrains/kotlin/js/common/SourceInfoImpl.java deleted file mode 100644 index fb5b76dfc7c..00000000000 --- a/js/js.ast/src/org/jetbrains/kotlin/js/common/SourceInfoImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.common; - -import org.jetbrains.kotlin.js.Source; - -public class SourceInfoImpl implements SourceInfo { - protected Source source = null; - protected int line = -1; - protected int column = -1; - protected int start = -1; - protected int length = -1; - - public SourceInfoImpl(Source source, int line, int column, int start, int length) { - this.source = source; - this.line = line; - this.column = column; - this.start = start; - this.length = length; - } - - @Override - public Source getSource() { - return source; - } - - @Override - public int getLine() { - return line; - } - - @Override - public int getColumn() { - return column; - } - - @Override - public int getStart() { - return start; - } - - @Override - public int getLength() { - return length; - } -}