Skip to content

Commit 0b5f846

Browse files
committed
add RuleTypeRegexes
1 parent ba5d85f commit 0b5f846

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dictionary/dictionary.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Functionary, Rule } from './index';
1+
import { Functionary, Rule, RuleType } from './index';
22

33
const rules: Rule[] = [
44
{
@@ -29,9 +29,12 @@ const func: Functionary[] = [
2929
}
3030
];
3131

32+
const regexes = { boolean: /^(true|false)$/, keyword: /[a-zA-Z]/ };
33+
3234
export namespace dictionary {
3335

3436
export const Rules: Rule[] = rules;
37+
export const RuleTypeRegexes: Record<RuleType, RegExp> = regexes;
3538
export const PrimitiveTypes: string[] = ['int', 'decimal', 'boolean', 'string'];
3639
export const Keywords: string[] = ['export', 'rule', 'keyword', 'import', 'operator', 'function', 'global'];
3740
export const Functionaries: Functionary[] = func;

0 commit comments

Comments
 (0)