Properly print leading comments and indentation in functions

Store the entire function declaration, not just its job list.
This allows us to extract the body of the function complete with any
leading comments and indents.

Fixes #5285
This commit is contained in:
ridiculousfish
2020-01-03 14:40:28 -08:00
parent c3374edc59
commit 62302ee172
9 changed files with 71 additions and 25 deletions

View File

@@ -9,5 +9,5 @@ class parser_t;
struct io_streams_t;
int builtin_function(parser_t &parser, io_streams_t &streams, const wcstring_list_t &c_args,
const parsed_source_ref_t &source, tnode_t<grammar::job_list> body);
const parsed_source_ref_t &source, tnode_t<grammar::block_statement> body);
#endif