port lexer to cpp
This commit is contained in:
parent
cacc641378
commit
b3b21f3101
13 changed files with 276 additions and 32 deletions
14
src/compilers/Bindings.ts
Normal file
14
src/compilers/Bindings.ts
Normal 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")
|
||||
Reference in a new issue