cgrand / enliven

Enlive next: faster, better, broader
243 stars 7 forks source link

Added style transform based on phloc-css #3

Closed ckirkendall closed 10 years ago

ckirkendall commented 10 years ago

Here is the style transformation that matches the strategy we discussed. I also added the ability for defsegment to take doc strings and fixed some compiler warnings. I went to document the new appender segment and realized I couldn't do that.

cgrand commented 10 years ago

I'll look into merging it ASAP. Thank you.

Le dimanche 2 février 2014, Creighton Kirkendall notifications@github.com a écrit :

Here is the style transformation that matches the strategy we discussed. I also added the ability for defsegment to take doc strings and fixed some compiler warnings. I went to document the new appender segment and realized

I couldn't do that.

You can merge this Pull Request by running

git pull https://github.com/ckirkendall/enliven master

Or view, comment on, or merge it at:

https://github.com/cgrand/enliven/pull/3 Commit Summary

  • added the ability for segments to have doc strings
  • added styles and append-modified segments
  • added style transform
  • added basic tests for style transform
  • fixed some compiler warning

File Changes

  • M src/enliven/core/actions.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-0(3)
  • M src/enliven/core/segments.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-1(11)
  • M src/enliven/core/transformations.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-2(3)
  • M src/enliven/html.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-3(11)
  • M src/enliven/html/model.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-4(51)
  • M src/enliven/text.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-5(3)
  • M src/enliven/text/model.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-6(3)
  • M test/enliven/html_test.cljhttps://github.com/cgrand/enliven/pull/3/files#diff-7(15)

Patch Links:

Reply to this email directly or view it on GitHubhttps://github.com/cgrand/enliven/pull/3 .

On Clojure http://clj-me.cgrand.net/ Clojure Programming http://clojurebook.com Training, Consulting & Contracting http://lambdanext.eu/

cgrand commented 10 years ago

Thanks, I merged it and renamed append-modified-pairs to seg/append-on-assoc. I also documented the transition in the model.

The purpose of the transition info is to have a kind of static type system to enable code specialization (be it for static or dynamic emitting).