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
3a5cb153fb
update TODO
2020-01-13 12:09:01 +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
c4356f2793
Update TODO
2020-01-13 10:12:56 +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
9ccc1c7fc7
Add TODO file
2020-01-10 16:33:52 +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
ecd51e54af
sample: Use prefix
2020-01-10 15:58:34 +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
b518097344
sample: Test more types
2020-01-10 14:59: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
bcd16e5d24
sample: Actually test both variants
2020-01-10 14:52:47 +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
d789b03c2a
Add tests for the named types
2020-01-10 14:22:51 +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
12845735f5
Add more testing to sample.c
2020-01-10 13:23:39 +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
945c378f3d
Build sample with debug info
2020-01-10 12:59:48 +01:00
Alexander Larsson
50ab5da707
Add a sample with some tests
2020-01-10 11:53:15 +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