antlr-ng
Version:
Next generation ANTLR Tool
21 lines (20 loc) • 808 B
TypeScript
import type { Token } from "antlr4ng";
import { AttributeDict } from "./AttributeDict.js";
/** Track the names of attributes defined in arg lists, return values,scope blocks etc... */
export interface IAttribute {
/** The entire declaration such as "String foo" or "x:int" */
decl?: string;
/** The type; might be empty such as for Python which has no static typing */
type?: string;
/** The name of the attribute "foo" */
name: string;
/** A {@link Token} giving the position of the name of this attribute in the grammar. */
token?: Token;
/** The optional attribute initialization expression */
initValue?: string;
/** Who contains us? */
dict?: AttributeDict;
}
export declare namespace IAttribute {
const toString: (attribute: IAttribute) => string;
}