UNPKG

jc-marked

Version:

Markdown AST (Abstract syntax tree) parser based on finite-state machine (FSM).

34 lines (30 loc) 1.61 kB
/*! ***************************************************************************** Copyright (c) 2023 李俊才 All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare const regDecimalNumber: RegExp; declare const regOctalNumber: RegExp; declare const regHexadecimalNumber: RegExp; /** * 用一组正则测试一个字符串,当且仅当 * 满足所有正则表达式时结果返回 true,否则返回 false * @param regs 一组正则表达式 * @param text 被测试的文本 */ declare function regTestAll(regs: RegExp[], text: string, debug?: boolean): boolean; /** * 用一组正则测试一个字符串,只要任意一个 * 满足所有正则表达式时结果返回 true,否则返回 false * @param regs 一组正则表达式 * @param text 被测试的文本 */ declare function regTestAny(regs: RegExp[], text: string, debug?: boolean): boolean; export { regDecimalNumber, regOctalNumber, regHexadecimalNumber, regTestAll, regTestAny };