Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AjaniBilby committed Feb 20, 2024
1 parent c71f92c commit e15c213
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ npx bnf-compile ./syntax.bnf
```ts
import * as syntax from "./bnf/syntax.js";

const tree /*(1)!*/ = syntax.Parse_Program("abbaabab").root;
const block /*(2)!*/ = program.value[0];
const firstBs = program.value[1];
const tree = syntax.Parse_Program("abbaabab").root;
const chunk = program.value[0]; // typescript knows this this **will** be of type `Term_Chunk`
const firstBs = program.value[1];
const bCount: number = firstBs.value.length; // typescript knows this **will** be a number
```

Expand Down

0 comments on commit e15c213

Please sign in to comment.