lexer for recursive descent parsers
npm i lexer-next
|
pnpm add lexer-next
|
yarn add lexer-next
|
# createLexer
(tokenize)
src/index.ts#L106
# tokenize
createLexer(tokenize) =>
# LexerErrorCauses
src/causes.ts#L1 # LexerError
src/index.ts#L15
# constructor
(cause)
src/index.ts#L21 # cause
src/index.ts#L16 # name
= 'LexerError'
src/index.ts#L20 # prepareStackTrace
# (err, stackTraces)
# err
# stackTraces
(err, stackTraces) =>
# stackTraceLimit
# captureStackTrace
(targetObject, constructorOpt)
# targetObject
# constructorOpt
captureStackTrace(targetObject, constructorOpt) =>
# RegExpToken
# constructor
(pattern)
# new RegExpToken
()
# new RegExpToken
()
# new RegExpToken
()
# Token
# constructor
(value)
# new Token
()
# new Token
()
# group
# source
# index
# value
# as
(value, group)
# value
# group
as(value, group) =>
# is
(group, value)
# group
# value
is(group, value) =>
# toJSON
()
# create
(value, group, source)
# value
# group
# source
create(value, group, source) =>
# Lexer
src/index.ts#L46 # RegExpMatchArrayLike
# TokenJson
# group
# source
{
# index
# input
# match
}
# value
# ErrorHandler
src/index.ts#L31 # FilterFunction
src/index.ts#L39 # LexerFactory
src/index.ts#L95 # Tokenizer
src/index.ts#L41 # (input)
# input
(input) =>
IterableIterator<RegExpMatchArray>
# createLexer
(tokenize)
src/index.ts#L106
# tokenize
createLexer(tokenize) =>
Fork or edit and submit a PR.
All contributions are welcome!
MIT © 2022 stagas