Use 'visitor.on' instead of 'visitor.for'

master
Futago-za Ryuu 6 years ago
parent 7cd291cbe0
commit 72ba85b3af

@ -40,7 +40,7 @@ module.exports = {
};
// Helper's to create visitor's for use with the ASTVisitor class
const on = ASTVisitor.for = {
const on = ASTVisitor.on = {
// Visit a node that is defined as a property on another node
property( name ) {

@ -317,7 +317,15 @@ declare namespace peg {
}
interface IOn {
property( name: string ): IVisitor;
children( name: string ): IVisitor;
}
const build: IVisitorBuilder;
const on: IFor;
}
@ -325,6 +333,7 @@ declare namespace peg {
ASTVisitor: visitor.ASTVisitor;
build: visitor.IVisitorBuilder;
on: visitor.IOn;
}

Loading…
Cancel
Save