diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-26 19:02:43 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-26 19:02:43 +0300 |
commit | 96e460d047cc199b27e2e35042a5789cce9d1e91 (patch) | |
tree | ebd742a3f1b50d16f5371976ba0456bde0db0cb0 /spec | |
parent | 23ae28153f0d9ae16e7d20a4b2e1b9eef94bbaaf (diff) |
add evil fspec file
Diffstat (limited to 'spec')
-rw-r--r-- | spec/evil.fspec | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/evil.fspec b/spec/evil.fspec new file mode 100644 index 0000000..68d4800 --- /dev/null +++ b/spec/evil.fspec @@ -0,0 +1,28 @@ +struct metadata { + u2 lel; + enum { + STR_TERMINATED, + STR_DELIMITED + } u1 type; + struct { + u8 smth; + } test; + u8 encoding[32][sizeof("foo")]; + u1 blaz[builtin(1, 2, "foo", 'bar')] | hellothere('foobar', 1, 2, "faa"); +}; + +struct utf8_string { + struct metadata metadata; + select (((metadata.type))) { + metadata.STR_TERMINATED) + struct { + u8 string['\0'] | encoding(metadata.encoding) str; + } terminated; + metadata.STR_DELIMITED) + struct { + u32 length; + u8 string[length] | encoding(metadata.encoding) str; + } delimited; + } data; + u1 foo[((((metadata.test.smth)))) + 5 + 2][4]; +}; |