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

Possible evaluation of context for '$' character #21

Open
griffin-rickle opened this issue Aug 25, 2020 · 3 comments
Open

Possible evaluation of context for '$' character #21

griffin-rickle opened this issue Aug 25, 2020 · 3 comments
Labels
wontfix This will not be worked on

Comments

@griffin-rickle
Copy link

Hi!
I first want to say that this is the best, most comprehensive syntax highlighting library for Linked Data in Sublime I have come across. Great job!

When using it, I have some SPARQL queries that follow this sort of pattern:

INSERT{
  GRAPH ${var1}{
    ...
  }
}
${var2}
WHERE {
  ...
}

I'm not sure whether this actually breaks any of the rules for the SPARQL specification. If it does, then I would understand if you didn't want to do anything. However, it looks like the current context for the $ character does not look for any quotes around it, and all regular expressions I've used in any SPARQL query have been within quotes. I looked into it a bit myself, but I'm not sure how sublime packages work or how to make the changes myself. Is this behavior that could be implemented?

@blake-regalia
Copy link
Owner

the current context for the $ character does not look for any quotes around it, and all regular expressions I've used in any SPARQL query have been within quotes.

Hmm, could you clarify a bit more here? Are you trying to embed SPARQL queries within strings of another programming language? If so, what does this have to do with regular expressions and quotes? Maybe I am misunderstanding.

@griffin-rickle
Copy link
Author

griffin-rickle commented Aug 26, 2020

Are you trying to embed SPARQL queries within strings of another programming language?

Yeah I suppose it's similar to that, but I want to have these as separate files. Thinking about it now it doesn't make a ton of sense to change the whole highlighter for this use case, but I figured I would ask.

@blake-regalia
Copy link
Owner

The template would require its own language/syntax def, but if you're feeling savvy you could definitely clone the repo and extend the sparql.syntax-source with a few rules to accommodate the interpolations.

@blake-regalia blake-regalia added the wontfix This will not be worked on label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants