Commit Graph
81 Commits
Author SHA1 Message Date
Alexander Larsson 8dac5ebb4b ostree-test also handle dirtree and summary 2020-01-13 15:35:23 +01:00
Alexander Larsson b8959d4ff6 Add gitignore 2020-01-13 14:45:53 +01:00
Alexander Larsson 1cb3b48a94 Add ostree testing code 2020-01-13 14:45:00 +01:00
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 0651cb2717 clean up ostree sample 2020-01-13 14:20:59 +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 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