All Projects → zegl → Tre

zegl / Tre

Licence: mit
LLVM backed progamming language (Go subset)

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects
language
365 projects

Labels

Projects that are alternatives of or similar to Tre

Fcd
An optimizing decompiler
Stars: ✭ 622 (+522%)
Mutual labels:  llvm, clang
Termux Ndk
android-ndk for termux
Stars: ✭ 91 (-9%)
Mutual labels:  llvm, clang
Woboq codebrowser
Woboq CodeBrowser
Stars: ✭ 837 (+737%)
Mutual labels:  llvm, clang
Llvm Vs2017 Integration
MSBuild 15.0 Toolset integration for multiple LLVM (From v5 to v8)
Stars: ✭ 84 (-16%)
Mutual labels:  llvm, clang
Avalonstudio
Cross platform IDE and Shell
Stars: ✭ 1,132 (+1032%)
Mutual labels:  llvm, clang
Clangkit
ClangKit provides an Objective-C frontend to LibClang. Source tokenization, diagnostics and fix-its are actually implemented.
Stars: ✭ 330 (+230%)
Mutual labels:  llvm, clang
Llvm 9.0 Learner Tutorial
A blog for LLVM(v9.0.0 or v11.0.0) beginner, step by step, with detailed documents and comments. Record the way I learn LLVM and accomplish a complete project for FPGA High-Level Synthesis with it.
Stars: ✭ 58 (-42%)
Mutual labels:  llvm, clang
clang-format-editor
Clang-Format Editor is a tool that helps you find the best Clang-Format Style for your C++, C#, Java, JavaScript, and Objective-C code.
Stars: ✭ 15 (-85%)
Mutual labels:  llvm, clang
Optviewer Demo
Demonstration of LLVM's opt-viewer tool
Stars: ✭ 63 (-37%)
Mutual labels:  llvm, clang
Zapcc
zapcc is a caching C++ compiler based on clang, designed to perform faster compilations
Stars: ✭ 1,109 (+1009%)
Mutual labels:  llvm, clang
Swiftweekly.github.io
A community-driven weekly newsletter about Swift.org
Stars: ✭ 305 (+205%)
Mutual labels:  llvm, clang
Meta Clang
Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
Stars: ✭ 76 (-24%)
Mutual labels:  llvm, clang
Clang Power Tools
Bringing clang-tidy magic to Visual Studio C++ developers.
Stars: ✭ 285 (+185%)
Mutual labels:  llvm, clang
Enzyme
High-performance automatic differentiation of LLVM.
Stars: ✭ 418 (+318%)
Mutual labels:  llvm, clang
Olifant
A simple programming language targeting LLVM
Stars: ✭ 58 (-42%)
Mutual labels:  llvm, clang
C2goasm
C to Go Assembly
Stars: ✭ 1,072 (+972%)
Mutual labels:  llvm, clang
llvm-project-prepo
Fork of LLVM with modifications to support a program repository
Stars: ✭ 27 (-73%)
Mutual labels:  llvm, clang
llvm-svn
Arch Linux PKGBUILD for LLVM, Clang et al. (latest SVN code)
Stars: ✭ 18 (-82%)
Mutual labels:  llvm, clang
Cxxctp
DEPRECATED. USE INSTEAD github.com/blockspacer/flextool
Stars: ✭ 58 (-42%)
Mutual labels:  llvm, clang
Seeless
C IDE for iOS
Stars: ✭ 71 (-29%)
Mutual labels:  llvm, clang

tre

A LLVM backed Go compiler.

tre is built in Go and can compile a subset of Go code to LLVM IR. Clang is used to compile the IR to an executable.

Building

# Build tre and run a test program
go build -i github.com/zegl/tre/cmd/tre && ./tre tests/tests/fib.tre && ./output-binary

Example

Example program that calculates the fibonacci sequence.

func fib(num int) int {
    if num < 2 {
        return num
    }

    return fib(num-2) + fib(num-1)
}

func main() {
    printf("%d\n", fib(34))
}

More examples of what's possible can be found in the compiler testdata.

Features

Types

  • [x] int
  • [x] string
  • [x] struct
  • [x] array
  • [x] slice
  • [ ] map
  • [x] bool
  • [x] func
  • [ ] chan

Language features

Dependencies

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].