Expand description
Hacker Lang Configuration Parser
This crate provides a robust parser and serializer for .hk files used in Hacker Lang, the programming language for HackerOS. It supports nested structures, comments, and error handling.
Enums§
- HkError
- Custom error type for parsing .hk files.
- HkValue
- Enum for values in the .hk config: either a simple string or a nested map.
Functions§
- load_
hk_ file - Loads and parses a .hk file from the given path.
- parse_
hk - Parses a .hk file from a string input.
- serialize_
hk - Serializes a HkConfig back to a .hk string.
- write_
hk_ file - Writes a HkConfig to a file.
Type Aliases§
- HkConfig
- Represents the structure of a .hk file. Sections are top-level keys in the outer HashMap. Values can be simple strings or nested HashMaps for subsections.