Class ButNotSymbol
Package: grammarkdown
The `but not` operator allows you to reference a *Nonterminal* on the left, excluding some part of that production.
A but not B
Constructors
constructor(left, butKeyword, notKeyword, right)
Constructs a new instance of the ButNotSymbol
class
Declaration
constructor(left: LexicalSymbol, butKeyword: Token<SyntaxKind.ButKeyword> | undefined, notKeyword: Token<SyntaxKind.NotKeyword> | undefined, right: LexicalSymbol | undefined);
Parameters
- left
- LexicalSymbol
- butKeyword
- Token<SyntaxKind.ButKeyword> | undefined
- notKeyword
- Token<SyntaxKind.NotKeyword> | undefined
- right
- LexicalSymbol | undefined
Properties
butKeyword
Declaration
readonly butKeyword: Token<SyntaxKind.ButKeyword> | undefined;
Property Value
Token<SyntaxKind.ButKeyword> | undefined
edgeCount
Declaration
protected get edgeCount(): number;
Property Value
number
firstChild
Declaration
get firstChild(): Node | undefined;
Property Value
Node | undefined
lastChild
Declaration
get lastChild(): Node | undefined;
Property Value
Node | undefined
left
Declaration
readonly left: LexicalSymbol;
Property Value
notKeyword
Declaration
readonly notKeyword: Token<SyntaxKind.NotKeyword> | undefined;
Property Value
Token<SyntaxKind.NotKeyword> | undefined
right
Declaration
readonly right: LexicalSymbol | undefined;
Property Value
LexicalSymbol | undefined
Methods
accept(visitor)
Declaration
protected accept(visitor: NodeVisitor): ButNotSymbol;
Parameters
- visitor
- NodeVisitor
Returns
children()
Declaration
children(): IterableIterator<Node>;
Returns
IterableIterator<Node>
edgeName(offset)
Declaration
protected edgeName(offset: number): string | undefined;
Parameters
- offset
- number
Returns
string | undefined
edgeValue(offset)
Declaration
protected edgeValue(offset: number): Node | ReadonlyArray<Node> | undefined;
Parameters
- offset
- number
Returns
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(left, right)
Declaration
update(left: LexicalSymbol, right: LexicalSymbol | undefined): ButNotSymbol;
Parameters
- left
- LexicalSymbol
- right
- LexicalSymbol | undefined