Remove unused SourceInfo interface

This commit is contained in:
Alexey Tsvetkov
2018-04-08 01:06:57 +03:00
parent 87558873b5
commit 701f96998a
2 changed files with 0 additions and 119 deletions
@@ -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.
*
* <p>
* The parser supplies useful well-defined source ranges to the nodes it creates.
*
* @return the 0-based character index, or <code>-1</code>
* 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.
* <p>
* The parser supplies useful well-defined source ranges to the nodes it creates.
*
* @return a (possibly 0) length, or <code>0</code>
* if no source source position information is recorded for this node
* @see #getStart()
* @see HasSourceInfo#setSourceLocation(Source, int, int, int, int)
*/
int getLength();
}
@@ -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;
}
}