Skip to content

Commit 67ec6cd

Browse files
committed
wasm: this is CstNode in AstMapping functions
1 parent ce0a2a8 commit 67ec6cd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ohm-js/wasm",
3-
"version": "0.6.12",
3+
"version": "0.6.13",
44
"description": "Compile Ohm.js grammars to WebAsssembly",
55
"main": "dist/index.js",
66
"exports": {

packages/wasm/src/createToAst.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {
55
MatchResult,
66
NonterminalNode,
77
TerminalNode,
8-
ListNode,
98
} from './miniohm.ts';
109

1110
export type AstNodeTemplate<R> = {
@@ -22,7 +21,7 @@ export type AstMapping<R> = Record<
2221
string,
2322
| AstNodeTemplate<R>
2423
| number // forward to nth child
25-
| ((...children: CstNodeChildren) => R) // semantic action-style
24+
| ((this: CstNode, ...children: CstNodeChildren) => R) // semantic action-style
2625
>;
2726

2827
function childAt(

0 commit comments

Comments
 (0)