Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2024-02-07 | Add experimental support for JSON value types | Boris Kolpackov | 1 | -0/+107 | |
New types: json json_array json_object New functions: $json.value_type(<json>) $json.value_size(<json>) $json.member_{name,value}(<json-member>) $json.object_names(<json-object>) $json.array_size(<json-array>) $json.array_find(<json-array>, <json>) $json.array_find_index(<json-array>, <json>) $json.load(<path>) $json.parse(<text>) $json.serialize(<json>[, <indentation>]) For example, to load a JSON value from a file: j = $json.load($src_base/board.json) Or to construct it in a buildfile: j = [json] one@1 two@([json] 2 3 4) three@([json] x@1 y@-1) This can also be done incrementally with append/prepend: j = [json_object] j += one@1 j += two@([json] 2 3 4) j += three@([json] x@1 y@-1) Instead of using this JSON-like syntax, one can also specify valid JSON input text: j = [json] '{"one":1, "two":[2, 3, 4], "three":{"x":1, "y":-1}' Besides the above set of functions, other handy ways to access components in a JSON value are iteration and subscript. For example: for m: $j print $member_name($m) $member_value($m) print ($j[three]) A subscript can be nested: print ($j[two][1]) print ($j[three][x]) While a JSON value can be printed directly like any other value, the representation will not be pretty-printed. As a result, for complex JSON values, printing a serialized representation might be a more readable option: info $serialize($j) | |||||
2023-06-12 | Hack around GCC 13 -Wdangling-reference false positives | Boris Kolpackov | 1 | -6/+6 | |
See GCC bugs 107532, 110213. | |||||
2022-12-14 | Improve empty simple value to empty list of names reduction heuristics | Boris Kolpackov | 1 | -4/+7 | |
Specifically, do not reduce typed RHS empty simple values for prepend/append and additionally for assignment provided LHS is typed and is a container. | |||||
2022-10-13 | Reorder functions to help MinGW GCC with DLL symbol exporting | Boris Kolpackov | 1 | -8/+8 | |
2022-10-13 | Switch to public/private variables model | Boris Kolpackov | 1 | -1/+14 | |
Now unqualified variables are project-private and can be typified. | |||||
2021-01-30 | Add std::{map, multimap} to types.hxx | Boris Kolpackov | 1 | -3/+3 | |
Seeing that std::map is becoming a common Buildfile variable type. | |||||
2021-01-28 | Make std::map prepend (=+) overriding (like insert_or_assign()) | Boris Kolpackov | 1 | -0/+36 | |
2021-01-22 | Add support for optional pair halves in variable values | Boris Kolpackov | 1 | -0/+25 | |
2020-08-24 | Add copying version of convert<T>(value) | Boris Kolpackov | 1 | -4/+14 | |
2020-08-12 | Add int64 and int64s variable types | Boris Kolpackov | 1 | -0/+28 | |
2020-06-02 | Add process_path_ex with program stable name and checksum | Boris Kolpackov | 1 | -1/+19 | |
2020-04-27 | Add support for untyped assignment to value | Boris Kolpackov | 1 | -0/+16 | |
2020-02-07 | Drop copyright notice from source code | Karen Arutyunov | 1 | -1/+0 | |
2019-11-12 | Add support for vector<pair<K, V>> variable values | Boris Kolpackov | 1 | -0/+31 | |
2019-10-22 | Move global mutex shards to context | Boris Kolpackov | 1 | -1/+1 | |
2019-08-23 | Introduce notion of build context | Boris Kolpackov | 1 | -1/+1 | |
All non-const global state is now in class context and we can now have multiple independent builds going on at the same time. | |||||
2019-07-01 | Split build system into library and driver | Boris Kolpackov | 1 | -0/+812 | |