gura library
Dart library for parsing Gura configuration files
Functions
-
dump(
Map< String, dynamic> value) → String -
Stringifies the given
Map<String, dynamic>
value
into a Gura-compatible string, which can be written to file if desired. -
parse(
String text, {Map< String, String> ? env}) → Map<String, dynamic> - Parses the given text following the Gura configuration format.
-
parseFile(
File guraFile, {Map< String, String> ? env}) → Future<Map< String, dynamic> > - Parses the contents of the given File following the Gura configuration format, asynchronously.
-
parseFileSync(
File guraFile, {Map< String, String> ? env}) → Map<String, dynamic> - Parses the contents of the given file following the Gura configuration format, synchronously.
Exceptions / Errors
- DuplicatedImportError
- Thrown when a file is imported more than once
- DuplicatedKeyError
- Thrown when a key is defined more than once
- DuplicatedVariableError
- Thrown when a variable is defined more than once
- FileNotFoundError
- Thrown when file to be parsed does not exist
- InvalidIndentationError
- Thrown when indentation is invalid
- ParseError
- Thrown when an error occurred during parsing
- VariableNotDefinedError
- Thrown when a variable is not defined