Closed foresmac closed 7 years ago
Seems like you're correct. Feel free to submit a PR if you have time Aaaand it seems like you already did submit a PR :smiley:
Oh your PR was against the language-python repo; would you mind fixing it on this end as well, if you have time? :bow:
Yeah, as soon as I figure out CoffeeScript I'll see what I can do!
The PR i submitted for atom/language-python#104 is so the python grammar will recognize embedded SQL statements that begin with the WITH
keyword. However, it doesn't appear as though the SQL grammar recognizes the WITH
keyword for proper highlighting to begin with.
I think what I want is something that recognizes WITH
as a keyword.other.cte.sql
.
Then maybe I want something that does captures
and uses a regex like: (with)\\s+(//w+)\\s+(as)
'1':
'name': 'keyword.other.cte.sql'
'2':
'name': 'entity.name.alias.sql' # maybe?
'3':
'name': 'keyword.other.alias.sql'
Something like that, right? Sorry, I'm trying to parse how these grammars work.
WITH is also used in MS SQL queries:
SELECT * FROM table WITH(NOLOCK) WHERE something=something
etc.
So a highlight here would be good also.
@thomasjo Does my comment from Oct 9 make sense? I'm just not 100% certain how the grammar structure works. This is definitely outside my area of expertise but I'm willing to learn if there's some reference for how the grammar parser works.
Looks like WITH
was added in #42. Closing.
I looked through the grammar and could not find
with
orWITH
which is used to begin a Common Table Expression (CTE).May be related to atom/language-python#102.