port lexer to cpp

This commit is contained in:
Asaki Yuki 2026-01-18 20:46:18 +07:00
parent cacc641378
commit b3b21f3101
13 changed files with 276 additions and 32 deletions

14
src/compilers/Bindings.ts Normal file
View file

@ -0,0 +1,14 @@
import bindings from "bindings"
import { Token } from "./bindings/types.js"
export const {
Lexer,
isBlankChar,
isWordChar,
isNumberChar,
}: {
Lexer: (input: string) => Token[]
isBlankChar: (char: string) => boolean
isWordChar: (char: string) => boolean
isNumberChar: (char: string) => boolean
} = bindings("asajs-compiler")