Skip to main content

Crate hk_parser

Crate hk_parser 

Source
Expand description

Hacker Lang Configuration Parser

This crate provides a robust parser and serializer for .hk files used in Hacker Lang. 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: supports strings, numbers, booleans, arrays, and maps.

Traits§

FromHkValue

Functions§

load_hk_file
Loads and parses a .hk file from the given path.
parse_hk
Parses a .hk file from a string input.
resolve_interpolations
Resolves interpolations in the config, including env vars and references.
serialize_hk
Serializes a HkConfig back to a .hk string, preserving key order.
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 IndexMap to preserve order.