Hack'n'Leap's interpreter is the library used in the game of the same name to enable players to code their own functions. This interpreter supports fairly basic pseudo-code instructions.
- Build the solution
- Import the
.dll
file as a reference in your project - Import the library in your code using
using InterpreterLib;
- You can now use the library !
using InterpreterLib;
using System.Text;
public class Program
{
static void Main(string[] args)
{
string line;
StringBuilder stringBuilder = new StringBuilder();
Console.Clear();
Console.Title = "Interpreter";
Console.WriteLine("Code :");
while (!string.IsNullOrWhiteSpace(line = Console.ReadLine())) { stringBuilder.AppendLine(line); }
string myCode = stringBuilder.ToString();
Interpreter myInterpreter = new Interpreter();
Console.WriteLine("Exit :");
myInterpreter.EvaluateCode(myCode);
}
}
We welcome contributions from everyone. If you would like to contribute, please follow the guide below :
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
). - Commit your Changes (
git commit -m 'Add some AmazingFeature'
). - Push to the Branch (
git push origin feature/AmazingFeature
). - Open a pull request.
This project is distribued under the MIT license.