/*! * Copyright 2016 The ANTLR Project. All rights reserved. * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ import { Parser } from '../Parser'; import { ParseTreeVisitor } from './ParseTreeVisitor'; import { SyntaxTree } from './SyntaxTree'; /** An interface to access the tree of {@link RuleContext} objects created * during a parse that makes the data structure look like a simple parse tree. * This node represents both internal nodes, rule invocations, * and leaf nodes, token matches. * *
The payload is either a {@link Token} or a {@link RuleContext} object.
*/ export interface ParseTree extends SyntaxTree { readonly parent: ParseTree | undefined; getChild(i: number): ParseTree; /** The {@link ParseTreeVisitor} needs a double dispatch method. */ accept