summaryrefslogtreecommitdiff
path: root/node_modules/yaml/dist/parse/lexer.d.ts
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-11-28 17:14:38 +0100
committerMinteck <contact@minteck.org>2022-11-28 17:14:38 +0100
commit18efd30a263ec0d79a26a82cbd8c90c9f81056b7 (patch)
treeaea01bf3506dda706719fc68eb37b77ed9ef3fe8 /node_modules/yaml/dist/parse/lexer.d.ts
downloadautoreport-18efd30a263ec0d79a26a82cbd8c90c9f81056b7.tar.gz
autoreport-18efd30a263ec0d79a26a82cbd8c90c9f81056b7.tar.bz2
autoreport-18efd30a263ec0d79a26a82cbd8c90c9f81056b7.zip
Open sourceHEADmane
Diffstat (limited to 'node_modules/yaml/dist/parse/lexer.d.ts')
-rw-r--r--node_modules/yaml/dist/parse/lexer.d.ts87
1 files changed, 87 insertions, 0 deletions
diff --git a/node_modules/yaml/dist/parse/lexer.d.ts b/node_modules/yaml/dist/parse/lexer.d.ts
new file mode 100644
index 0000000..238e7b5
--- /dev/null
+++ b/node_modules/yaml/dist/parse/lexer.d.ts
@@ -0,0 +1,87 @@
+/**
+ * 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
+ */
+export declare class Lexer {
+ /**
+ * Flag indicating whether the end of the current buffer marks the end of
+ * all input
+ */
+ private atEnd;
+ /**
+ * Explicit indent set in block scalar header, as an offset from the current
+ * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not
+ * explicitly set.
+ */
+ private blockScalarIndent;
+ /**
+ * Block scalars that include a + (keep) chomping indicator in their header
+ * include trailing empty lines, which are otherwise excluded from the
+ * scalar's contents.
+ */
+ private blockScalarKeep;
+ /** Current input */
+ private buffer;
+ /**
+ * Flag noting whether the map value indicator : can immediately follow this
+ * node within a flow context.
+ */
+ private flowKey;
+ /** Count of surrounding flow collection levels. */
+ private flowLevel;
+ /**
+ * Minimum level of indentation required for next lines to be parsed as a
+ * part of the current scalar value.
+ */
+ private indentNext;
+ /** Indentation level of the current line. */
+ private indentValue;
+ /** Position of the next \n character. */
+ private lineEndPos;
+ /** Stores the state of the lexer if reaching the end of incpomplete input */
+ private next;
+ /** A pointer to `buffer`; the current position of the lexer. */
+ private pos;
+ /**
+ * 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.
+ *
+ * @returns A generator of lexical tokens
+ */
+ lex(source: string, incomplete?: boolean): Generator<string, void, unknown>;
+ private atLineEnd;
+ private charAt;
+ private continueScalar;
+ private getLine;
+ private hasChars;
+ private setNext;
+ private peek;
+ private parseNext;
+ private parseStream;
+ private parseLineStart;
+ private parseBlockStart;
+ private parseDocument;
+ private parseFlowCollection;
+ private parseQuotedScalar;
+ private parseBlockScalarHeader;
+ private parseBlockScalar;
+ private parsePlainScalar;
+ private pushCount;
+ private pushToIndex;
+ private pushIndicators;
+ private pushTag;
+ private pushNewline;
+ private pushSpaces;
+ private pushUntil;
+}