Class Nonterminal
Package: grammarkdown
Represents a non-terminal reference to another Production.
IdentifierReference[~Yield, ~Await]
Constructors
constructor(name, argumentList, questionToken)
Constructs a new instance of the Nonterminal
class
Declaration
constructor(name: Identifier, argumentList: ArgumentList | undefined, questionToken: Token<SyntaxKind.QuestionToken> | undefined);
Parameters
- name
- Identifier
- argumentList
- ArgumentList | undefined
- questionToken
- Token<SyntaxKind.QuestionToken> | undefined
Properties
argumentList
Declaration
readonly argumentList: ArgumentList | undefined;
Property Value
ArgumentList | undefined
firstChild
Declaration
get firstChild(): Node | undefined;
Property Value
Node | undefined
lastChild
Declaration
get lastChild(): Node | undefined;
Property Value
Node | undefined
name
Declaration
readonly name: Identifier;
Property Value
Methods
children()
Declaration
children(): IterableIterator<Node>;
Returns
IterableIterator<Node>
forEachChild(cbNode)
Declaration
forEachChild<T>(cbNode: (node: Node) => T | undefined): T | undefined;
Type Parameters
- T
Parameters
- cbNode
- (node: Node) => T | undefined
Returns
T | undefined
update(name, argumentList)
Declaration
update(name: Identifier, argumentList: ArgumentList | undefined): Nonterminal;
Parameters
- name
- Identifier
- argumentList
- ArgumentList | undefined