A transpiler written in rust, which translates C# code into Java code.
- Place your C# code inside input.cs
- Run the program using
cargo run - The resulting code can be found inside output.java
- Parses C# classes and methods
- Detects C# Main() and converts it into a Java main(String[] args) function
- Supports variable declaration
- Supports assignments and expressions, including
- Binary expressions
- Unary expressions
- Parses if-else statements
- Parses for loops and while-loops
- Handles function calls
- Handles user output and input
Console.WriteLine->System.out.printlnConsole.ReadLine->Scannertype inputint.Parse,double.Parse,bool.Parse->scanner.nextInt(), etc
- Supports nested function calls, such as
int.Parse(Console.ReadLine()) - Automatically declares a Java Scanner when user input is needed
- Does not support switch, try-catch and other advanced features
- Does not support arrays
- Only handles predefined types (int, bool, float, double, string)
- Invalid or unsupported C# syntax may cause the program to panic