Parser class

Creates key-value pairs from strings formatted as environment variable definitions.

Constructors

Parser()
Parser methods are pure functions.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

interpolate(String val, Map<String, String> env) String
Substitutes $bash_vars in val with values from env.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
parse(Iterable<String> lines) Map<String, String>
Creates a Map suitable for merging into Platform.environment. 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) 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
Returns 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