RegExpParamParser<T> class
SegmentParser that matches a segment against the supplied regExp, like RegExpParser, except that it also injects the resulting key-value pair into the ParseContext, which can be queried from Segment.create or Segment.createError.
- Inheritance
-
- Object
- SegmentParser
- ParamParser<
T> - RegExpParamParser
Constructors
- RegExpParamParser({required String key, required RegExp regExp, required T map(RegExpMatch match)})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
The key by which the injected value of a parameter can be exctracted from
ParseContext.
finalinherited
- map → T Function(RegExpMatch match)
-
User defined conversion from a RegExpMatch to
T
. To include the matched String literally, use the static factory method RegExpParamParser.forward instead.final - regExp → RegExp
-
The regular expression a segment is matched against
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
ParseContext context, String source) → ParseParamResult -
Handles the actual parsing logic
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited