Sha256: 8cf5d582ff0fec6f1b2234456a891e66f884426fa7e81627c72d58cca79547e7

Contents?: true

Size: 935 Bytes

Versions: 7

Compression:

Stored size: 935 Bytes

Contents

import ParseRule, { MatchExpression } from "./ParseRule";
import { CodeBlock } from "./types";
export declare class Parser {
  text: string;
  textLength: number;
  textPosition: number;
  rules: ParseRule[];
  /**
   * @param text - Text to parse
   * @param rules - Array of parsing rules. If none of specified rules match default rule with type text will be used.
   */
  constructor(text: string, rules?: ParseRule[]);
  scan(): string | null;
  isDone(): boolean;
  move(length: number): void;
  match(
    cb: CodeBlock,
    expression?: MatchExpression | MatchExpression[],
    wholeword?: boolean,
  ): string | undefined;
  matchStart(cb: CodeBlock, rule: ParseRule): string | undefined;
  matchEnd(cb: CodeBlock, rule: ParseRule): string | undefined;
  matchSkip(cb: CodeBlock, rule: ParseRule): string | undefined;
  createDefaultTextObject(text: string): {
    type: string;
    start: string;
  };
  parse(): CodeBlock;
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dorian-2.6.3 vendor/groovy-beautify/dist/parser/Parser.d.ts
dorian-2.6.2 vendor/groovy-beautify/dist/parser/Parser.d.ts
dorian-2.6.1 vendor/groovy-beautify/dist/parser/Parser.d.ts
dorian-2.6.0 vendor/groovy-beautify/dist/parser/Parser.d.ts
dorian-2.5.2 vendor/groovy-beautify/dist/parser/Parser.d.ts
dorian-2.5.1 vendor/groovy-beautify/dist/parser/Parser.d.ts
dorian-2.5.0 vendor/groovy-beautify/dist/parser/Parser.d.ts