Skip to main content

Built and signed on GitHub Actions

An extremely simple JavaScript RegExp-based lexer.

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
a week ago (0.1.2)
type alias SimpleLexerTokenDefinition

A definition for a token type for SimpleLexer.

Type Parameters

T extends keyof any = keyof any

Properties

The name of the token.

The pattern used for this token.

Specify a string for an exact match. Specify a RegExp for more complicated patterns.

Note: Keep in mind that patterns will be combined into a single concatenated RegExp with the uy flags (or iuy if ignoreCase option is true). Flags set on the patterns in the token definition itself will be ignored.

Add Package

deno add @seally/simple-lexer

Import symbol

import { type SimpleLexerTokenDefinition } from "@seally/simple-lexer";

---- OR ----

Import directly with a jsr specifier

import { type SimpleLexerTokenDefinition } from "jsr:@seally/simple-lexer";

Add Package

npx jsr add @seally/simple-lexer

Import symbol

import { type SimpleLexerTokenDefinition } from "@seally/simple-lexer";

Add Package

yarn dlx jsr add @seally/simple-lexer

Import symbol

import { type SimpleLexerTokenDefinition } from "@seally/simple-lexer";

Add Package

pnpm dlx jsr add @seally/simple-lexer

Import symbol

import { type SimpleLexerTokenDefinition } from "@seally/simple-lexer";

Add Package

bunx jsr add @seally/simple-lexer

Import symbol

import { type SimpleLexerTokenDefinition } from "@seally/simple-lexer";