-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add GameMaker Language support #1551
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
There are however a few things we will have to fix before we can merge this:
- Please don't edit
components.js
as it is a generated file.
Add GML tocomponents.json
add gulp will generate the.js
for you.
Also, you don't need to add the minified file yourself. gulp will also do that the next time you execute thenpx gulp
command. - Prism uses tabs for indentation.
- Please wrap all your token names (e.g.
keyword
,function
,constant
, etc.) in single quotes.
This makes your language definition easier to read plus it's what the other languages do too. - Please use non-capturing groups.
- Aren't
enum
andvar
keywords? - Consider extending
c-like
.
I don't see a lot of differences between the two languages and it would makecomment
,function
,string
, andboolean
obsolete.
I also left you a few comments on things that I found.
Because lookbehind doesn't do anything.
Because it is misleading here
Please do not modify the |
Currently completed 1, 3, 5, 6 and I will modify it completely later. |
@RunDevelopment |
@LiarOnce |
@RunDevelopment Visual Studio Code |
@RunDevelopment Is it |
@LiarOnce To change the indentation, select the |
You can also enable the |
@LiarOnce I just noticed that there is no documentation for that function, so here is a quick explanation for our example: So our new language extending Prism.languages.gml = Prism.languages.extend('clike', {
'keyword': ...,
'number': ...,
'operator': ...,
'constant': ...,
'variable': ...,
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LiarOnce
Why did you choose to keep comment
, function
, and string
? All of them have definitions in C-like.
Or are there some cases the C-Like definition does not cover which I just don't see?
@RunDevelopment
It worked fine when I removed c-like |
@LiarOnce |
This reverts commit 03dc8b1.
@RunDevelopment |
@LiarOnce Now, I have a few questions and suggestions:
|
@LiarOnce I noticed that you accidentally reverted the alias you added. Also you will have to rebuild Prism by running After that is done @mAAdhaTTah or @Golmote can merge it. |
@RunDevelopment The alias has been restored. |
Oops, I wrote this comment but never posted it: One suuuuuuuuuuuuuuuuuuuper minor adjustment, and you need to run gulp and commit the minified version of gml. |
Still need to commit the minified file, then we're all set! |
@mAAdhaTTah |
Thanks for the contribution! |
GameMaker is a cross-platform game engine developed by YoYo Games.
GameMaker Language is a language built into the GameMaker series (such as GameMaker 8, GameMaker: Studio, GameMaker Studio 2).
The syntax is from the official documentation, example from GMU_Anim