Browse Source

update test and example

main
heck 2 years ago
parent
commit
2e9117e6ac
  1. 7
      examples/example1/example1.yml2
  2. 36
      lm-c99/tests/test_enum_doc/test_enum.yml2

7
examples/example1/example1.yml2

@ -18,14 +18,13 @@ pEpACIDLang {
enum enum1 { enum enum1 {
item item1 doc="item with automatic value"; item item1 doc="item with automatic value";
item item2 23 doc="item with explicit value"; item item2 23 doc="item with explicit decimal value";
hex item3 0xff item item3 "0xff"
doc= doc=
""" """
hex enum item hex enum item
------------- -------------
use 'hex' instead of 'item' specify value in quotes
and specify value as 3rd param
"""; """;
}; };

36
lm-c99/tests/test_enum_doc/test_enum.yml2

@ -6,9 +6,33 @@ pEpACIDLang {
license "License text"; license "License text";
copyleft "Copyleft text"; copyleft "Copyleft text";
api test { api test_enum {
enum implicit_value_items {
item item1;
item item2;
item item3;
item item4;
};
enum explicit_dec_value_items {
item item1 0;
item item2 2;
item item3 987;
item item4 -3;
};
enum explicit_hex_value_items {
item item1 "0x0";
item item2 "0x2";
item item2 "0xFF";
item item2 "0xff";
item item3 "0x987";
item item4 "0x3";
};
};
enum good { api test_enum_doc {
enum doc_well_formatted {
item item1 doc="oneline doc"; item item1 doc="oneline doc";
item item2 doc=""; item item2 doc="";
item item3 item item3
@ -38,10 +62,10 @@ pEpACIDLang {
doc with bad formattting """; doc with bad formattting """;
}; };
enum hex_items { enum item_items_with_doc {
hex item1 0x00; item item1 0x00;
hex item2 0x10 doc="oneline doc"; item item2 0x10 doc="oneline doc";
hex item3 0xff item item3 0xff
doc= doc=
""" """
item 3 item 3

Loading…
Cancel
Save