authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-14 13:54:08 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-14 13:54:08 -07:00
loga40a27e182c022c67370b6af790e201baa4ae908
tree35f59ed3ed1465193308695568c4fefffd91fe58
parentf7e32bef2698466232c80e110c80051bf8204bd8

ast- make Body a type


1 files changed, 5 insertions(+), 3 deletions(-)

src/astgen.zig+5-3
...@@ -12,7 +12,7 @@ pub const Value = union(enum) {...@@ -12,7 +12,7 @@ pub const Value = union(enum) {
12 string: string,12 string: string,
13 replacement: []const string,13 replacement: []const string,
14 block: Block,14 block: Block,
15 body: []const Value,15 body: Body,
16 function: Fn,16 function: Fn,
17};17};
1818
...@@ -30,8 +30,8 @@ pub const Attr = struct {...@@ -30,8 +30,8 @@ pub const Attr = struct {
30pub const Block = struct {30pub const Block = struct {
31 name: Type,31 name: Type,
32 args: []const []const string,32 args: []const []const string,
33 body: []const Value,33 body: Body,
34 bttm: []const Value,34 bttm: Body,
3535
36 pub const Type = enum {36 pub const Type = enum {
37 each,37 each,
...@@ -42,6 +42,8 @@ pub const Block = struct {...@@ -42,6 +42,8 @@ pub const Block = struct {
42 };42 };
43};43};
4444
45pub const Body = []const Value;
46
45pub const Fn = struct {47pub const Fn = struct {
46 name: string,48 name: string,
47 args: []const []const string,49 args: []const []const string,