Skip to content

Commit

Permalink
added NearleyToken interface back
Browse files Browse the repository at this point in the history
  • Loading branch information
bandaloo committed Nov 28, 2020
1 parent aba4a50 commit c486135
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
output += parser.customTokens.map(function (token) { return "declare var " + token + ": any;\n" }).join("")
output += parser.body.join('\n');
output += "\n";
output += "interface NearleyToken {";
output += " value: any;\n";
output += " [key: string]: any;\n";
output += "};\n";
output += "\n";
output += "interface NearleyLexer {\n";
output += " reset: (chunk: string, info: any) => void;\n";
output += " next: () => NearleyToken | undefined;\n";
Expand Down

0 comments on commit c486135

Please sign in to comment.