Alexander Larsson
547b69b665
Default to shallow print
2020-01-13 14:43:35 +01:00
Alexander Larsson
353f14d34f
Handle empty non-fixed-element array lengths
2020-01-13 14:43:14 +01:00
Alexander Larsson
e2fe9c0805
Add _from_bytes and _from_data for types
2020-01-13 14:42:46 +01:00
Alexander Larsson
693178f67e
Fix output coding style
2020-01-13 14:20:41 +01:00
Alexander Larsson
347deb4e82
Fix up generated indentation
2020-01-13 14:03:34 +01:00
Alexander Larsson
87904050a3
Support endian attributes
2020-01-13 13:55:22 +01:00
Alexander Larsson
8b2c465f02
Add peek_as_variant and ref_to_variant for all types
2020-01-13 13:27:26 +01:00
Alexander Larsson
646a5296e7
Generate peeking struct accessors for fixed and arrays of fixed
2020-01-13 13:21:13 +01:00
Alexander Larsson
2b4a342287
as_variant, not as_gvariant
2020-01-13 12:55:31 +01:00
Alexander Larsson
5635fb83a8
Generate fixed structs
2020-01-13 12:47:32 +01:00
Alexander Larsson
c376930900
Generate entry typedef with other types
2020-01-13 12:08:02 +01:00
Alexander Larsson
b0a0cfdf9e
Use snake_case_ and SNAKE_CASE_ for functions/macros
2020-01-13 12:01:43 +01:00
Alexander Larsson
5443c60918
Rename formating keys to make things clearer
2020-01-13 11:35:22 +01:00
Alexander Larsson
612a56cc58
Allow multi-element prefix
...
We now do a proper snake_cast to CamelCase conversion
2020-01-13 11:21:36 +01:00
Alexander Larsson
dc8427ee51
Use CamelCase for auto-generated field typenames
...
Ie StructField instead of Struct_field
2020-01-13 11:13:55 +01:00
Alexander Larsson
e8d8965602
Rename PrefixFoo => PrefixFooRef
2020-01-13 11:07:04 +01:00
Alexander Larsson
c9235f37c1
Rename VariantRef to Ref
2020-01-13 10:31:36 +01:00
Alexander Larsson
6b1a45ccab
Fix dict length calculation
...
We were incorrectly using the value fixed size as the whole element
rather than the combined key + value which is the actual element.
This also renames DictType.element_type to value_type to avoid further
similar confusion.
2020-01-13 10:25:24 +01:00
Alexander Larsson
0c45ba386e
Add --outfile option
2020-01-13 10:05:45 +01:00
Alexander Larsson
d9bad51f44
All prints via one function
2020-01-13 10:02:23 +01:00
Alexander Larsson
269f6347d6
More output cleanup
2020-01-13 09:44:16 +01:00
Alexander Larsson
5263dd6707
More code output cleanup
2020-01-13 09:27:19 +01:00
Alexander Larsson
c6176d2361
Add parent struct and index to Field
2020-01-13 09:26:56 +01:00
Alexander Larsson
ad5de84fdb
Centralize and standardize code output
2020-01-10 20:19:30 +01:00
Alexander Larsson
d966b53d55
Better typenames for arrays and maybes of types with known names
2020-01-10 16:29:45 +01:00
Alexander Larsson
a2373cd0c8
More changes to generated names
2020-01-10 16:19:23 +01:00
Alexander Larsson
e9a0391f8d
more variant_chunk => variant_ref
2020-01-10 16:10:35 +01:00
Alexander Larsson
e0727256cc
Foovariant => FooVariant
2020-01-10 16:10:02 +01:00
Alexander Larsson
aa03d5be68
New array/maybe basic default names
2020-01-10 16:06:14 +01:00
Alexander Larsson
6db8a90c47
VariantChunk => VariantRef
2020-01-10 16:00:31 +01:00
Alexander Larsson
a7fb7296c2
Support prefixes
...
This is not ideal, as we still don't quite separate function prefixes
and type prefixes for generated types, but at least we're not crowding
the global namespace.
2020-01-10 15:57:47 +01:00
Alexander Larsson
fe28401d8c
Return the GString from xxx_format()
2020-01-10 15:15:22 +01:00
Alexander Larsson
483daa479c
Fix formating of doubles
2020-01-10 14:59:07 +01:00
Alexander Larsson
955954c5f2
Fix quotes used when formating objectpath and signature
2020-01-10 14:58:51 +01:00
Alexander Larsson
5059c6b6be
Fix missing backslash in objectpath format string
2020-01-10 14:44:42 +01:00
Alexander Larsson
02fc4bee84
parse: Return failure on parse error
2020-01-10 14:44:22 +01:00
Alexander Larsson
1eb742b986
Support nameable types
...
This way you can add typedefs inline with the idl, like so:
typedef Foo {
bar: 'Bar {
x: int32;
};
bar_again: Bar;
}
2020-01-10 14:20:22 +01:00
Alexander Larsson
f3c3ba6403
Fix stray = in generated code
2020-01-10 13:26:27 +01:00
Alexander Larsson
ca9d5124b7
fixed type annotation formating
2020-01-10 13:25:03 +01:00
Alexander Larsson
4f6aa0d314
Struct: Add indexof for all fields
2020-01-10 13:23:25 +01:00
Alexander Larsson
7fcb6fbd14
Arrays: Only ever type annotate first element
2020-01-10 13:01:11 +01:00
Alexander Larsson
39645ef942
Fix dict get_value for variable size keys
2020-01-10 13:00:12 +01:00
Alexander Larsson
3fd42f99d0
Generate dict lookup function
2020-01-10 11:47:18 +01:00
Alexander Larsson
b4a51195a7
Update variant formating and helpers
2020-01-10 11:46:56 +01:00
Alexander Larsson
0774faadb6
Fix array/dicts with non-fixed elements
2020-01-10 10:09:12 +01:00
Alexander Larsson
3a40eb426b
Fix function definition coding style in output
2020-01-10 10:02:11 +01:00
Alexander Larsson
16828b91e6
Add generate_print() helper
...
These are all the same anyway
2020-01-10 10:01:49 +01:00
Alexander Larsson
268d255c40
Use compound literals when returning structs
2020-01-10 09:47:53 +01:00
Alexander Larsson
49ea1821e9
Add macros for frame table access
2020-01-10 09:41:34 +01:00
Alexander Larsson
39a8c17d65
Centralize all typedef generation
2020-01-10 08:54:54 +01:00