Skip to content

Commit

Permalink
fix: program file and invocation macro not returning
Browse files Browse the repository at this point in the history
  • Loading branch information
denispionicul committed Jan 5, 2025
1 parent 858cadc commit 30c9cf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion RobloxCS/LuauGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ node.Expression is IdentifierNameSyntax identifier &&
return newInstanceCall;
var macro = _macro.Invocation(Visit, node);

return new Luau.Call(callee, argumentList);
return macro ?? new Luau.Call(callee, argumentList);
}

public override Luau.ArgumentList VisitArgumentList(ArgumentListSyntax node)
Expand Down
7 changes: 1 addition & 6 deletions RobloxCS/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ public static class Program
{
public static void Main(string[] args)
{
var source = """
using System.Collections.Generic;
var m = new List<int>();
m.Add(6);
""".Trim(); //File.ReadAllText(args[0]).Trim();
var source = File.ReadAllText(args[0]).Trim();

Console.WriteLine(Transpiler.Transpile(source));
}
Expand Down

0 comments on commit 30c9cf4

Please sign in to comment.