You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I am struggling to find a correct way to support Textmate grammar with embedded language. For example, I want to embed sql into python and all the code inside sql( and ) should be considered as SQL code.
I add custom grammar rule to MagicPython grammer file and successfully make the token returned by tokenizeLine have SQL grammar scope name (something like *.sql). However, I don't know how to make the token returned by tokenizeLine2 to have language sql rather than python
e.g.
For SELECT in sql(SELECT): tokenizeLine will return: keyword.other.DML.sql, which is defined in Sql.tmLanguage.json tokenizeLine2 will return a Uint32Array, but the mask the array will show language is python rather than sql
Any idea about how to fix this? I appreciate any help and understand there are a lot of moving parts here to make this all work!
The text was updated successfully, but these errors were encountered:
Hello everyone, I am struggling to find a correct way to support Textmate grammar with embedded language. For example, I want to embed sql into python and all the code inside
sql(
and)
should be considered as SQL code.I add custom grammar rule to MagicPython grammer file and successfully make the token returned by
tokenizeLine
have SQL grammar scope name (something like *.sql). However, I don't know how to make the token returned bytokenizeLine2
to have languagesql
rather thanpython
e.g.
For
SELECT
insql(SELECT)
:tokenizeLine
will return:keyword.other.DML.sql
, which is defined inSql.tmLanguage.json
tokenizeLine2
will return a Uint32Array, but the mask the array will show language ispython
rather thansql
Any idea about how to fix this? I appreciate any help and understand there are a lot of moving parts here to make this all work!
The text was updated successfully, but these errors were encountered: