/** * Copyright 2017 Matt Acosta * * 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 { IComparable, IHashable } from '@mattacosta/php-common'; /** * A line number and character position. */ export declare class LinePosition implements IComparable, IHashable { /** * A line position at the start of a document (0,0). */ static readonly Zero: LinePosition; /** * The offset of the character in the line. */ readonly character: number; /** * The line number, starting from 0. */ readonly line: number; /** * Constructs a `LinePosition` object. * * @param {number} line * The line number, starting from 0. * @param {number} character * The offset of the character in the line. */ constructor(line?: number, character?: number); /** * @inheritDoc */ compareTo(value: LinePosition): number; /** * @inheritDoc */ equals(value: LinePosition): boolean; /** * @inheritDoc */ hashCode(): number; }