/** * 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 { INode } from './INode'; import { Node } from './Node'; import { NodeFlags } from './NodeFlags'; import { NodeList } from './NodeList'; import { NodeTransform } from './NodeTransform.Generated'; import { NodeVisitor } from './NodeVisitor.Generated'; import { SourceTextSyntaxNode } from '../syntax/SourceTextSyntaxNode'; import { SyntaxDiagnostic } from '../../diagnostics/SyntaxDiagnostic'; import { TokenNode } from './TokenNode'; /** * The root node of a token metadata tree. */ export declare class SourceTextNode extends Node { readonly statements: NodeList | null; readonly eof: TokenNode; protected _flags: NodeFlags; protected _fullWidth: number; protected hash: number; /** * Constructs a `SourceTextNode` object. * * @param {NodeList|null} statements * A list of top-level statements in the parsed source text. * @param {TokenNode} eof * The EOF token that contains any trailing trivia at the end of a file. * @param {ReadonlyArray=} diagnostics * A list of diagnostics associated with this node. */ constructor(statements: NodeList | null, eof: TokenNode, diagnostics?: ReadonlyArray); get count(): number; get flags(): NodeFlags; get fullWidth(): number; accept(visitor: NodeVisitor): void; acceptResult(visitor: NodeTransform): T; childAt(index: number): INode | null; createSyntaxNode(): SourceTextSyntaxNode; hashCode(): number; withDiagnostics(diagnostics: ReadonlyArray): SourceTextNode; protected computeHashCode(): number; protected updateFlagsAndWidth(flags: NodeFlags, fullWidth: number): void; }