Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@dunno/lexicon - create simple lexers easily

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"));

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages