Skip to content

Add an string_contents node #52

@mauricioszabo

Description

@mauricioszabo

First, thanks for this great work - I like it!

So, I am working on injecting JS into cljs code like this: (js* "console.log(~{});", 10) (that's a valid ClojureScript code). This will parse as (sym_lit ... (string_lit) (num_lit)).

What I want is to inject a Javascript grammar into this string_lit, but unfortunately, this doesn't work because what will be captured by the JS grammar is "console.log(~{});", and not only the inner contents.

Is it easy/possible to break down (string_lit) into "\"" (string_contents) "\""?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions