Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String parsing #155

Open
WorldsEndless opened this issue Jan 3, 2018 · 1 comment
Open

String parsing #155

WorldsEndless opened this issue Jan 3, 2018 · 1 comment

Comments

@WorldsEndless
Copy link
Collaborator

WorldsEndless commented Jan 3, 2018

After searching the issues, wiki, and readme, I don't see this feature, which would be a tremendous step in the direction of increasing compatibility and making Garden more eco-friendly: The ability to paste in existing plain CSS (e.g. at a repl) and having it produce an equivalent Garden data structure. Philosophically this seems like a very Clojure-type thing to do, and it would also do wonders for the major use cases of 1) those with existing sizable CSS codebases they are concerned with moving to Garden, and 2) Those who want to grab online snippets and insert them easily into their projects.

I'm sure this is a no-brainer and has been discussed before, and I'd be willing to work on it but only if no one knows of a project working on this already.

Resources to grok:

@noprompt
Copy link
Owner

noprompt commented Jan 4, 2018

Yes. This is something we can tackle on the branch #123 is tied to or we can do this post #123 merge. Because v2.0.0 parses "Garden syntax" into an AST the underlying AST will be the target of any string parser. This gives us parity between parsing and unparsing (compiling). I'm hesitant to take on additional dependencies but in this case it might be warranted to draw on instaparse.

@noprompt noprompt changed the title Feature Request: Parsing string -> Clojure/Garden CSS String parsing Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants