Skip to content

Commit

Permalink
Start IL.
Browse files Browse the repository at this point in the history
  • Loading branch information
atrexus committed Jan 23, 2024
1 parent 4b20b2b commit eee591e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Unluau/Chunk/IChunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unluau.IL;

namespace Unluau.Chunk
{
Expand All @@ -17,5 +18,11 @@ public interface IChunk
/// <param name="stream">The input stream.</param>
/// <returns>A new chunk.</returns>
public static abstract IChunk Create(Stream stream);

/// <summary>
/// Translates the current chunk to the IL.
/// </summary>
/// <returns></returns>
public Program Translate();
}
}
10 changes: 10 additions & 0 deletions src/Unluau/Chunk/LuauChunk.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Unluau.Utils;
using Unluau.Chunk.Luau;
using Unluau.IL;

namespace Unluau.Chunk
{
Expand Down Expand Up @@ -94,5 +95,14 @@ private Function[] ReadFunctions(BinaryReader reader)

return functions;
}

/// <summary>
/// Translates the current chunk to the universal IL.
/// </summary>
/// <returns>A new IL program.</returns>
public Program Translate()
{
throw new NotImplementedException();
}
}
}
12 changes: 12 additions & 0 deletions src/Unluau/IL/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Unluau.IL
{
public class Program
{
}
}

0 comments on commit eee591e

Please sign in to comment.