https://github.com/polsys/cle
A native code compiler for a C-like language.
https://github.com/polsys/cle
compiler dotnet dotnet-core programming-language
Last synced: 28 days ago
JSON representation
A native code compiler for a C-like language.
- Host: GitHub
- URL: https://github.com/polsys/cle
- Owner: polsys
- License: mit
- Created: 2018-12-16T16:32:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T13:43:46.000Z (almost 6 years ago)
- Last Synced: 2025-01-21T09:48:52.585Z (about 1 year ago)
- Topics: compiler, dotnet, dotnet-core, programming-language
- Language: C#
- Homepage: https://polsys.github.io/cle/
- Size: 633 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cle - a simple C-like language
[](https://dev.azure.com/polsys/cle/_build/latest?definitionId=3?branchName=master)
[](https://sonarcloud.io/dashboard?id=polsys_cle)
[](https://sonarcloud.io/dashboard?id=polsys_cle)
Cle (stylized as Clé, for the French word) is a simple programming language inspired by C#, Rust and C/C++, compiled to optimized native code.
It is a hobby project of [@polsys](https://github.com/polsys), and as such not safe for production use but hopefully an interesting learning project.
## Building
This is a .NET Core 3.0 project. Install the SDK, then execute
```
dotnet build
```
to restore NuGet packages and compile the solution.
Alternatively, open the solution in up-to-date Visual Studio 2019 or later.
Unit test projects use NUnit and can be executed with `dotnet test` or in Visual Studio.
## Usage
The final compiler executable is produced in the output folder for `Cle.Frontend` project.
Execute
```
dotnet cle.dll [directory]
```
to compile files in the specified directory.
The default is to compile files in the current directory.
Specify the `--help` option for more information.
For an example of a Clé program, see the [integration test cases](test/Cle.IntegrationTests/TestCases/Functional).
## Contributing
As this is a personal hobby project, I'm not really expecting contributions, but feel free to tinker with the code and share your work!
Once past the initial bringup, I'll work in the open using GitHub issues and PRs, both for fun and to make the design history visible.