coppolaemilio / language-gml

GML syntax highlighting
MIT License
5 stars 2 forks source link

Create a GMX grammar #4

Closed ThomasHickman closed 8 years ago

ThomasHickman commented 8 years ago

GMX is not a filetype for a GML source file - it is an xml file for objects in GameMaker - see https://docs.yoyogames.com/source/dadiospice/001_advanced%20use/008_exporting%20and%20importing%20resources.html

coppolaemilio commented 8 years ago

While I understand and agree with what GMX is, when you have code inside an object having the syntax highlighted is very useful. Not sure what do you think about it.

ThomasHickman commented 8 years ago

I have just published linter-gml, and because atom matches by scope, the XML file gets linted (and shows irrelevant error messages). I don't know if I could just restrict the linting to file types, not scopes, I might look into this.

ThomasHickman commented 8 years ago

A better solution may be to have a "gmx" grammar, which uses the xml grammar for anything other than string tags (which can contain GML code), then marks anything inside string tags as GML syntax. See the commit above.