StringChars class
Parses the string characters using the normalChar predicate to parse regular (unescaped) characters, using the controlChar character to match an escape character, and the escape parser to parse the interpretation of the escape sequence.
Example:
StringValue(_isNormalChar, 0x5c, _escaped);
- Inheritance
-
- Object
- ParserBuilder<
String, String> - StringChars
Constructors
-
StringChars.new(Calculable<
bool> normalChar, int controlChar, ParserBuilder<String, String> escape) -
const
Properties
- controlChar → int
-
final
-
escape
→ ParserBuilder<
String, String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOptional → bool
-
Returns
true
if the generated parser is optional; otherwise returnsfalse
.no setterinherited - isSequential → bool
-
no setterinherited
- name → String?
-
Returns the name of the parser.
no setterinherited
-
normalChar
→ Calculable<
bool> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context, bool hasResult) → BuildResult -
Builds a parser and returns the build result.
inherited
-
buildBody(
BuildContext context, bool hasResult) → BuildBodyResult -
Builds a parser function body and returns the source code of the function
body.
override
-
checkIsNotOptional(
ParserBuilder< String, Object?> p) → void -
inherited
-
getCombinedParsers(
) → Iterable< (ParserBuilder< String, Object?> , bool?)> -
inherited
-
getResultType(
) → String -
Returns a textual representation of the parser result type.
inherited
-
getStartingCharacters(
) → Iterable< (int, int)> -
Returns the starting characters of the parser.
inherited
-
getStartingErrors(
) → Iterable< String> -
Returns the starting errors of the parser.
inherited
-
isNullableResultType(
) → bool -
Returns
true
if the parser result type is nullable; otherwise returnsfalse
.inherited -
isNullableType<
T> () → bool -
Returns
true
if typeT
is nullable; otherwise returnsfalse
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited