tanzim-value
Package | Documentation | Repository
Foundational value types for the tanzim pipeline.
Types
- [
Value] —Bool,Int,Float,String,List,Map(no null) - [
LocatedValue] —Value+ [Location] (full originating [tanzim_source::Source], optional 1-based line/column) - [
Map] — orderedVec-backed map; last inserted key wins on lookup - [
Error] — parse-time errors; use{error:#}for source snippet with caret underline
Location
[Location] holds the full originating [tanzim_source::Source] (name, options, resource,
including any on_error policy) so any value or error can be traced back to how it was
declared. Positions (line, column, length) are 1-based and stored as Option<NonZeroU32>.
[Error] boxes its [Location] field so results stay small enough to return by value without
tripping clippy::result_large_err. Construct via [Location::in_source] (real source) or
[Location::at] (bare name/resource for synthetic origins); neither exposes NonZeroU32 to
callers.
Example
use ;
let mut map = new;
let location = at;
map.insert;
map.insert;
assert!;
assert_eq!;
Features
No optional features. This crate is always included as-is.
Relations
- Used by all other tanzim crates.
tanzim-parseproducesLocatedValuetrees from raw bytes.tanzim-mergeconsumesLocatedValuetrees to produce merged maps.