Parser class
Creates key-value pairs from strings formatted as environment variable definitions.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
interpolate(
String val, Map< String, String?> env) → String -
Substitutes $bash_vars in
val
with values fromenv
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Iterable< String> lines) → Map<String, String> - Creates a Map. Duplicate keys are silently discarded.
-
parseOne(
String line, {Map< String, String> env = const {}}) → Map<String, String> - Parses a single line into a key-value pair.
-
strip(
String line, {bool includeQuotes = false}) → String - Strips comments (trailing or whole-line).
-
surroundingQuote(
String val) → String -
If
val
is wrapped in single or double quotes, returns the quote character. Otherwise, returns the empty string. -
swallow(
String line) → String - Omits 'export' keyword.
-
toString(
) → String -
A string representation of this object.
inherited
-
unquote(
String val) → String - Removes quotes (single or double) surrounding a value.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited