diff options
Diffstat (limited to 'cudl.h')
-rw-r--r-- | cudl.h | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -7,10 +7,7 @@ struct cudl_array_value { }; struct cudl_map_value { - struct cudl_map_field { - char *key; - struct cudl_value value; - } *fields; + struct cudl_map_field *fields; size_t length; }; @@ -19,24 +16,31 @@ struct cudl_value { char *string; double number; int boolean; - struct array_value array; - struct map_value map; + struct cudl_array_value array; + struct cudl_map_value map; } data; int tag; }; +struct cudl_map_field { + char *key; + struct cudl_value value; +}; + enum { - CUDL_TAG_NULL; - CUDL_TAG_BOOL; - CUDL_TAG_ARRAY; -} + CUDL_TAG_NULL, + CUDL_TAG_BOOL, + CUDL_TAG_ARRAY, +}; enum { - CUDL_OK = 0; - CUDL_ERR_OUT_OF_MEMORY; - CUDL_ERR_EXPECTED_VALUE; - CUDL_ERR_READING; - CUDL_ERR_EXPECTED_BOOL_OR_NULL; + CUDL_OK = 0, + CUDL_ERR_OUT_OF_MEMORY, + CUDL_ERR_EXPECTED_VALUE, + CUDL_ERR_READING, + CUDL_ERR_EXPECTED_BOOL_OR_NULL, + CUDL_ERR_UNMATCHED_BRACK, + CUDL_ERR_UNRECOGNISED_VALUE, }; extern int cudl_err; |