inital
This commit is contained in:
5
node_modules/liquidjs/dist/parser/filter-arg.d.ts
generated
vendored
Normal file
5
node_modules/liquidjs/dist/parser/filter-arg.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { ValueToken } from '../tokens/value-token';
|
||||
type KeyValuePair = [string?, ValueToken?];
|
||||
export type FilterArg = ValueToken | KeyValuePair;
|
||||
export declare function isKeyValuePair(arr: FilterArg): arr is KeyValuePair;
|
||||
export {};
|
4
node_modules/liquidjs/dist/parser/index.d.ts
generated
vendored
Normal file
4
node_modules/liquidjs/dist/parser/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './tokenizer';
|
||||
export * from './parser';
|
||||
export * from './parse-stream';
|
||||
export * from './token-kind';
|
15
node_modules/liquidjs/dist/parser/parse-stream.d.ts
generated
vendored
Normal file
15
node_modules/liquidjs/dist/parser/parse-stream.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Token, TopLevelToken } from '../tokens';
|
||||
import { Template } from '../template';
|
||||
type ParseToken<T extends Token> = ((token: T, remainTokens: T[]) => Template);
|
||||
export declare class ParseStream<T extends Token = TopLevelToken> {
|
||||
private tokens;
|
||||
private handlers;
|
||||
private stopRequested;
|
||||
private parseToken;
|
||||
constructor(tokens: T[], parseToken: ParseToken<T>);
|
||||
on<T2 extends Template | T | undefined>(name: string, cb: (this: ParseStream, arg: T2) => void): ParseStream<T>;
|
||||
private trigger;
|
||||
start(): this;
|
||||
stop(): this;
|
||||
}
|
||||
export {};
|
1
node_modules/liquidjs/dist/parser/parse-stream.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/parser/parse-stream.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
20
node_modules/liquidjs/dist/parser/parser.d.ts
generated
vendored
Normal file
20
node_modules/liquidjs/dist/parser/parser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { ParseStream } from './parse-stream';
|
||||
import { TopLevelToken } from '../tokens';
|
||||
import { Template, Output, HTML } from '../template';
|
||||
import { LookupType } from '../fs';
|
||||
import type { Liquid } from '../liquid';
|
||||
export declare class Parser {
|
||||
parseFile: (file: string, sync?: boolean, type?: LookupType, currentFile?: string) => Generator<unknown, Template[], Template[] | string>;
|
||||
private liquid;
|
||||
private fs;
|
||||
private cache?;
|
||||
private loader;
|
||||
private parseLimit;
|
||||
constructor(liquid: Liquid);
|
||||
parse(html: string, filepath?: string): Template[];
|
||||
parseTokens(tokens: TopLevelToken[]): Template[];
|
||||
parseToken(token: TopLevelToken, remainTokens: TopLevelToken[]): import("../template").Tag | Output | HTML;
|
||||
parseStream(tokens: TopLevelToken[]): ParseStream<TopLevelToken>;
|
||||
private _parseFileCached;
|
||||
private _parseFile;
|
||||
}
|
1
node_modules/liquidjs/dist/parser/parser.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/parser/parser.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
16
node_modules/liquidjs/dist/parser/token-kind.d.ts
generated
vendored
Normal file
16
node_modules/liquidjs/dist/parser/token-kind.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export declare enum TokenKind {
|
||||
Number = 1,
|
||||
Literal = 2,
|
||||
Tag = 4,
|
||||
Output = 8,
|
||||
HTML = 16,
|
||||
Filter = 32,
|
||||
Hash = 64,
|
||||
PropertyAccess = 128,
|
||||
Word = 256,
|
||||
Range = 512,
|
||||
Quoted = 1024,
|
||||
Operator = 2048,
|
||||
FilteredValue = 4096,
|
||||
Delimited = 12
|
||||
}
|
62
node_modules/liquidjs/dist/parser/tokenizer.d.ts
generated
vendored
Normal file
62
node_modules/liquidjs/dist/parser/tokenizer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { FilteredValueToken, TagToken, HTMLToken, HashToken, QuotedToken, LiquidTagToken, OutputToken, ValueToken, Token, RangeToken, FilterToken, TopLevelToken, OperatorToken, LiteralToken, IdentifierToken, NumberToken } from '../tokens';
|
||||
import { Trie, TokenizationError } from '../util';
|
||||
import { Operators, Expression } from '../render';
|
||||
import { NormalizedFullOptions } from '../liquid-options';
|
||||
import { FilterArg } from './filter-arg';
|
||||
export declare class Tokenizer {
|
||||
input: string;
|
||||
file?: string | undefined;
|
||||
p: number;
|
||||
N: number;
|
||||
private rawBeginAt;
|
||||
private opTrie;
|
||||
private literalTrie;
|
||||
constructor(input: string, operators?: Operators, file?: string | undefined, range?: [number, number]);
|
||||
readExpression(): Expression;
|
||||
readExpressionTokens(): IterableIterator<Token>;
|
||||
readOperator(): OperatorToken | undefined;
|
||||
matchTrie<T>(trie: Trie<T>): number;
|
||||
readFilteredValue(): FilteredValueToken;
|
||||
readFilters(): FilterToken[];
|
||||
readFilter(): FilterToken | null;
|
||||
readFilterArg(): FilterArg | undefined;
|
||||
readTopLevelTokens(options?: NormalizedFullOptions): TopLevelToken[];
|
||||
readTopLevelToken(options: NormalizedFullOptions): TopLevelToken;
|
||||
readHTMLToken(stopStrings: string[]): HTMLToken;
|
||||
readTagToken(options: NormalizedFullOptions): TagToken;
|
||||
readToDelimiter(delimiter: string, respectQuoted?: boolean): number;
|
||||
readOutputToken(options?: NormalizedFullOptions): OutputToken;
|
||||
readEndrawOrRawContent(options: NormalizedFullOptions): HTMLToken | TagToken;
|
||||
readLiquidTagTokens(options?: NormalizedFullOptions): LiquidTagToken[];
|
||||
readLiquidTagToken(options: NormalizedFullOptions): LiquidTagToken | undefined;
|
||||
error(msg: string, pos?: number): TokenizationError;
|
||||
assert(pred: unknown, msg: string | (() => string), pos?: number): void;
|
||||
snapshot(begin?: number): string;
|
||||
/**
|
||||
* @deprecated use #readIdentifier instead
|
||||
*/
|
||||
readWord(): IdentifierToken;
|
||||
readIdentifier(): IdentifierToken;
|
||||
readNonEmptyIdentifier(): IdentifierToken | undefined;
|
||||
readTagName(): string;
|
||||
readHashes(jekyllStyle?: boolean | string): HashToken[];
|
||||
readHash(jekyllStyle?: boolean | string): HashToken | undefined;
|
||||
remaining(): string;
|
||||
advance(step?: number): void;
|
||||
end(): boolean;
|
||||
readTo(end: string): number;
|
||||
readValue(): ValueToken | undefined;
|
||||
readScopeValue(): ValueToken | undefined;
|
||||
private readProperties;
|
||||
readNumber(): NumberToken | undefined;
|
||||
readLiteral(): LiteralToken | undefined;
|
||||
readRange(): RangeToken | undefined;
|
||||
readValueOrThrow(): ValueToken;
|
||||
readQuoted(): QuotedToken | undefined;
|
||||
readFileNameTemplate(options: NormalizedFullOptions): IterableIterator<TopLevelToken>;
|
||||
match(word: string): boolean;
|
||||
rmatch(pattern: string): boolean;
|
||||
peekType(n?: number): number;
|
||||
peek(n?: number): string;
|
||||
skipBlank(): void;
|
||||
}
|
1
node_modules/liquidjs/dist/parser/tokenizer.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/parser/tokenizer.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
3
node_modules/liquidjs/dist/parser/whitespace-ctrl.d.ts
generated
vendored
Normal file
3
node_modules/liquidjs/dist/parser/whitespace-ctrl.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { Token } from '../tokens';
|
||||
import { NormalizedFullOptions } from '../liquid-options';
|
||||
export declare function whiteSpaceCtrl(tokens: Token[], options: NormalizedFullOptions): void;
|
Reference in New Issue
Block a user