Skip to content

added description for functions

Michael Aaron Murphy requested to merge Maaarcocr:master into master

Created by: Maaarcocr

Problem: Adding description to functions.

Solution: I have modified the rustpeg file in order to parse the added description. I have added the description field to the Function struct and to the struct that represents a function in the Statement enum. Now a function can be declared this way: fn name_of_func arg1 arg2 ... argN -- description. The description is optional in the parser. I have changed the print_functions function in function.rs such that when a description exists it will print it alongside the name of the function.

Changes introduced by this pull request: I had to add the description field in flow.rs in different points. I've added tests for parser.

TODOs: [what is not done yet.]

Fixes: #232 (closed)

Merge request reports