Welcome to arc, a handwritten compiler built in C#. This project demonstrates fundamental concepts of compiler construction, with a focus on creating a language that integrates well with an IDE by exposing APIs for parsing and type-checking.
The compiler is inspired by Microsoft's Roslyn (the C# and Visual Basic compiler platform), employing similar architectural ideas for parsing, type analysis, and tooling integration.
- Handwritten Compiler: Built from scratch in C# to illustrate compiler construction.
- Parsing and Type Checking APIs: Exposes APIs that allow integration with IDEs for enhanced tooling, such as syntax highlighting and error reporting.
- Educational Value: Aimed at developers interested in understanding how compilers work under the hood and how languages can be "tooled" for modern development environments.
- Roslyn-inspired Design: Leverages principles from Microsoft's Roslyn platform for clean architecture and extensibility.
arc serves as both a learning tool and a demonstration of compiler design. By following this project, you will:
- Learn how to implement a compiler from scratch.
- Understand how to build APIs for language tooling in IDEs.
- Explore concepts like parsing, syntax trees, and type analysis.
- .NET SDK: Ensure you have the .NET SDK installed on your machine. You can download it from dotnet.microsoft.com.
git clone https://github.com/arya2004/arc.git
cd arc
- Open the project in your favorite IDE (e.g., Visual Studio, JetBrains Rider, or VS Code with the C# extension).
- Restore dependencies:
dotnet restore
- Build the solution:
dotnet build
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request, ensuring you provide a clear description of your changes.
This project is licensed under the MIT License.