import { Lexer } from "jsr:@dunno/lexicon";
const math = new Lexer({
ignored_whitespace: /\s/, // tokens with ignored_ are not shown at output
number: /[0-9]+/,
operation: /[+-/*]/
})
console.log(math.lex("2 + 2"));
-
Notifications
You must be signed in to change notification settings - Fork 0
teamdunno/lexicon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published