-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Current situation
This gem has several Reader modules, in order to parse sexps with different syntaxes (Scheme, Common Lisp, SPARQL). However, it only has one Generator module, which doesn't all that work all that well for writing expressions that are to be parsed in a Common Lisp environment.
For example, we can read nil syntaxes for both Scheme and Common Lisp:
irb(main):017:0> SXP::Reader::Scheme.read '#n'
=> nil
irb(main):019:0> SXP::Reader::CommonLisp.read 'nil'
=> nil...but we can't easily write a Ruby nil in a CLisp-friendly way:
irb(main):027:0> SXP::Generator.string(nil).chomp
=> "#n"Proposed solution
It would be great to have Generator modules for the different syntaxes, perhaps something like this:
irb(main):027:0> SXP::Generator::Scheme.string(nil).chomp
=> "#n"
irb(main):028:0> SXP::Generator::CommonLisp.string(nil).chomp
=> "nil"If this looks like something worthwhile, I can try implementing it and making a pull request.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request