Skip to content

Commit aa1edaa

Browse files
committed
Adds new GML parser
1 parent b92aa01 commit aa1edaa

File tree

12 files changed

+1189
-12
lines changed

12 files changed

+1189
-12
lines changed

objects/oTestGML/Create_0.gml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,29 @@ struct = {
3030
show_debug_message(SnapToGML(struct, true));
3131
show_debug_message(SnapVisualize(SnapFromGML(SnapToGML(struct, true))));
3232

33-
var _string = @"
34-
//Here's a comment
35-
a = {b:10};
36-
37-
/*Block comment
38-
c = -999;
39-
*/
33+
SnapEnvGMLSetVariable("TestVar", 4);
34+
SnapEnvGMLSetVariableFunction("TestVarFunc", function()
35+
{
36+
return 0.1;
37+
});
38+
SnapEnvGMLSetVariable("max", max);
39+
SnapEnvGMLSetVariable("TestFunc", function()
40+
{
41+
if (argument_count <= 0) return undefined;
42+
43+
var _max = argument[0];
44+
var _i = 1;
45+
repeat(argument_count-1)
46+
{
47+
_max = max(argument[_i], _max);
48+
++_i;
49+
}
50+
51+
return _max;
52+
});
4053

41-
//In-line block comment
42-
d = /*888*/666;";
54+
var _string = @"
55+
c = 2000 + TestVar + TestVarFunc + TestFunc(100, 120, 110) + max(100, 120, 110)";
4356

44-
show_debug_message(SnapFromGML(_string));
57+
//show_debug_message(SnapVisualize(SnapFromGML(_string)));
58+
show_debug_message(SnapVisualize(SnapFromGMLNew(_string)));

rooms/rMain/rMain.yy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)