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

Use semicolon separator for multiple statements with same subject #71

Open
nyurik opened this issue Dec 3, 2018 · 1 comment
Open

Comments

@nyurik
Copy link

nyurik commented Dec 3, 2018

When formatting, I think it would be better to preserve semicolon, or even to always use it when possible. E.g. if two consequent statements have the same subject, use semicolon and indent the second statement. If statements have the same subject and predicate, use comma and put all objects on the same line. I think this makes SPARQL much more readable, and highlights the fact that the subject is the same.

Original:

SELECT * WHERE {
?osmid osmt:place "city";
osmt:wikidata ?wd.
}

Expected formatting:

SELECT * WHERE {
  ?osmid osmt:place "city";
         osmt:wikidata ?wd.
}

Current result:

SELECT * WHERE {
  ?osmid osmt:place "city".
  ?osmid osmt:wikidata ?wd.
}
@iddan
Copy link
Contributor

iddan commented Jan 13, 2019

Another option would be preserving the syntax variant in the AST

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

3 participants