1.1.6 • Published 1 month ago

@language-kit/lexer v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@language-kit/lexer (beta)

A package to convert strings to tokens.

Install

npm install @language-kit/lexer

Usage

import { Lexer } from '@language-kit/lexer'

const lexer = new Lexer()

const tokens = lexer.tokenize('1 + 2')

// output
[
  Token { type: 'Word', value: '1' },
  Token { type: 'WhiteSpace', value: ' ' },
  Token { type: 'Symbol', value: '+' },
  Token { type: 'WhiteSpace', value: ' ' },
  Token { type: 'Word', value: '2' },
  Token { type: 'EndOfFile', value: '' }
]

Support the development

Suggestions and issues are welcome

And for financial support you can check my: Github sponsor link

1.1.6

1 month ago

1.1.5

11 months ago

1.1.4

11 months ago

1.1.3

11 months ago

1.1.2

11 months ago

1.1.0

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago