dfintha / exprparser

Very basic expression parser written in C++.
0 stars 0 forks source link

Add an option to create text representation from tokens or syntax tree #9

Closed dfintha closed 2 months ago

dfintha commented 2 months ago

A to_expression_string() function should be implemented for both expr::token_list and expr::node_ptr that (re)creates the text representation of the expression given by the user.

dfintha commented 2 months ago

In the end it was only implemented for the parsed syntax tree (expr::node_ptr), as the spacing couldn't have been restored just based upon tokens.