Function
run
(
dateString: string,
token: string,
match: Match,
options: ParserOptions,
)
Source from the content-addressed store, hash-verified
| 8 | public subPriority?: number; |
| 9 | |
| 10 | public run( |
| 11 | dateString: string, |
| 12 | token: string, |
| 13 | match: Match, |
| 14 | options: ParserOptions, |
| 15 | ): { setter: ValueSetter<Value>; rest: string } | null { |
| 16 | const result = this.parse(dateString, token, match, options); |
| 17 | if (!result) { |
| 18 | return null; |
| 19 | } |
| 20 | |
| 21 | return { |
| 22 | setter: new ValueSetter<Value>( |
| 23 | result.value, |
| 24 | this.validate, |
| 25 | this.set, |
| 26 | this.priority, |
| 27 | this.subPriority, |
| 28 | ), |
| 29 | rest: result.rest, |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | protected abstract parse( |
| 34 | dateString: string, |
Tested by
no test coverage detected