aboutsummaryrefslogtreecommitdiff
path: root/doc/buildfile
AgeCommit message (Collapse)AuthorFilesLines
2024-02-07Add experimental support for JSON value typesBoris Kolpackov1-0/+1
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-08-09Auto-extract function documentation from functions-*.cxxBoris Kolpackov1-0/+277
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-01-16Update copyright yearKaren Arutyunov1-1/+1
2018-05-19Update copyright yearKaren Arutyunov1-1/+1
2017-07-12Make use of wildcards in buildfilesKaren Arutyunov1-13/+6
2017-01-05Update copyright yearBoris Kolpackov1-1/+1
2016-02-11Setup manual infraBoris Kolpackov1-2/+13
2016-01-31Setup doc/ install/distBoris Kolpackov1-0/+15