| ... | @@ -95,7 +95,8 @@ pub const Parser = struct { | ... | @@ -95,7 +95,8 @@ pub const Parser = struct { |
| 95 | }; | 95 | }; |
| 96 | | 96 | |
| 97 | /// Returns an AST tree, allocated with the parser's allocator. | 97 | /// Returns an AST tree, allocated with the parser's allocator. |
| 98 | /// Result should be freed with `freeAst` when done. | 98 | /// Result should be freed with tree.deinit() when there are |
| | 99 | /// no more references to any AST nodes of the tree. |
| 99 | pub fn parse(self: &Parser) !Tree { | 100 | pub fn parse(self: &Parser) !Tree { |
| 100 | var stack = self.initUtilityArrayList(State); | 101 | var stack = self.initUtilityArrayList(State); |
| 101 | defer self.deinitUtilityArrayList(stack); | 102 | defer self.deinitUtilityArrayList(stack); |