Shen-Language / shen-cl

Shen for Common Lisp (Unmaintained)
BSD 3-Clause "New" or "Revised" License
122 stars 11 forks source link

Add support for literal code `lisp.` form #19

Closed tizoc closed 6 years ago

tizoc commented 6 years ago

As discussed on the mailing list, this adds a (lisp. "literal code string") form similar to Shen/Scheme's scm. form.

(0-) (lisp. ":KEYWORD")
KEYWORD

(1-) (lisp. "NIL")
[]

(2-) (lisp. not-a-string)
Argument to lisp. must be a literal string

(3-) (lisp. "(DEFCLASS article ()
  ((title :ACCESSOR article-title :INITARG NIL)
   (author :ACCESSOR article-author)))")
funex1177

I don't know if it should be added or not, this is just a proof of concept.

rkoeninger commented 6 years ago

I like this, but before merging, I think we'd need to add a section to the README describing how to use it (and the lisp. generally) and the case-sensitivity of symbols in code passed to (lisp. ) and functions like shen-cl.exit (any other port-specific functions that should be advertised?), (maybe command-line options?). There could be a Features section before Prerequisites.

rkoeninger commented 6 years ago

Took the liberty of adding the Features section.

tizoc commented 6 years ago

@rkoeninger looks good! thank you for taking care of that.

rkoeninger commented 6 years ago

@tizoc Do you want to go ahead and merge this? Were you waiting on Antti to try it out? It seems like it provides an effective workaround to #18 .

tizoc commented 6 years ago

@rkoeninger no, I just forgot about it. Will update the changelog and merge in a few minutes.