























I built a programming language from scratch in C++. It has a C-like syntax with modern features: structs, enums, arrays, pointers, and a module system for splitting code across files.
The compiler pipeline goes: lexer - parser - semantic analyzer - LLVM IR - native binary.
I also wrote a standard library in C that Techlang functions can bind to using an extern keyword.
Next up is a GPU compute companion language that can call into Techlang code natively since both target LLVM IR. Haven't seen anyone else do this.
Blog post about how I built it: https://gummyniki.github.io/portfolio/blog/posts/compiler.ht...
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。