UNPKG

swift-pattern-compiler

Version:

A compiler which transforms SWIFT patterns to an object representation with additional information's.

26 lines (25 loc) 706 B
import { ISwiftObject } from "./interfaces"; /** * The compiler takes a swift pattern string and returns a swift object. * * ``` * compiler("35a"); * { * linesCount: 1, * lines: [ * { * minChars: 0, * maxChars: 35, * regExp: /[A-Z]{0,35}/, * allowedCharsClass: /[A-Z]/, * }, * ], * maxChars: 35, * regExp: /[A-Z]{0,35}/, * allowedCharsClass: /[A-Z]/, * } * ``` * @param input the swift pattern for compilation */ export declare const compiler: (input: string) => ISwiftObject; export default compiler;