Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/node_modules/yaml/browser/dist/index.js>Lexer

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
class Lexer
import { Lexer } from "https://deno.land/x/windmill@v1.380.1/node_modules/yaml/browser/dist/index.js";

Splits an input string into lexical tokens, i.e. smaller strings that are easily identifiable by tokens.tokenType().

Lexing starts always in a "stream" context. Incomplete input may be buffered until a complete token can be emitted.

In addition to slices of the original input, the following control characters may also be emitted:

  • \x02 (Start of Text): A document starts with the next token
  • \x18 (Cancel): Unexpected end of flow-mode (indicates an error)
  • \x1f (Unit Separator): Next token is a scalar value
  • \u{FEFF} (Byte order mark): Emitted separately outside documents

Constructors

new
Lexer()

Methods

lex(source, incomplete?)

Generate YAML tokens from the source string. If incomplete, a part of the last line may be left as a buffer for the next call.

parseNext(next)
peek(n)
pushSpaces(allowTabs)
pushToIndex(i, allowEmpty)
pushUntil(test)
setNext(state)