We're currently playing around with plot during a hackathon at XING and really like what you've done so far with the library. However we've run into a roadblock with arguments which this pull request attempts to fix.
The current code of Plot.Arg doesn't match what get's delivered by the generated parser. It gives you a bad match when trying to assign the parsed structure to Plot.Arg. The code in the tests for Plot.Arg indicates that you want the parser to deliver a keyword list / list of tagged tuples.
We thought parsing out atoms out of user supplied code doesn't seem like a good idea, because afaik the atom table is not garbage collected (Please correct me if I'm wrong here). That's why we changed the code back to parse out the arguments as binaries/strings.
This fixes the bad match and makes the whole Plug.parse_and_generate work end-2-end for that case.
Hey!
We're currently playing around with plot during a hackathon at XING and really like what you've done so far with the library. However we've run into a roadblock with arguments which this pull request attempts to fix.
The current code of
Plot.Arg
doesn't match what get's delivered by the generated parser. It gives you a bad match when trying to assign the parsed structure toPlot.Arg
. The code in the tests forPlot.Arg
indicates that you want the parser to deliver a keyword list / list of tagged tuples.We thought parsing out atoms out of user supplied code doesn't seem like a good idea, because afaik the atom table is not garbage collected (Please correct me if I'm wrong here). That's why we changed the code back to parse out the arguments as binaries/strings.
This fixes the bad match and makes the whole
Plug.parse_and_generate
work end-2-end for that case.What do you think?