Experimental language ยท compiler implemented in C++20

HitSimple language
and compiler

HitSimple is an experimental programming language. Its compiler is implemented in C++20 and builds native executables. It keeps storage separate from interpretation, so the same bytes can be used through explicit language-level meanings.

Compiler path

From source code to a native executable

The compiler carries a program through parsing, semantic analysis, an intermediate representation, and LLVM code generation.

  1. Source
  2. Preprocessor
  3. Lexer
  4. Parser
  5. AST
  6. Sema
  7. HIR
  8. LLVM IR
  9. Executable

Language features

What defines HitSimple

01

Explicit interpretation

Storage and interpretation templates stay separate, so a program states how each sequence of bytes is used.

02

Static operation resolution

Templates, methods, and operators are resolved from the program structure, without implicit cross-template conversion or runtime dispatch.

03

Selectable safety modes

Unchecked, static-checked, and checked modes let a program choose the safety-checking policy that fits its needs.

Use cases

What you can use HitSimple for

01

Build native programs

Use hsc to compile HitSimple source code into native executables for command-line programs and small systems experiments.

02

Connect native code

Use explicit C ABI declarations to connect HitSimple with C, C++, and Rust components that expose a compatible interface.

03

Study compiler construction

Follow the public pipeline from preprocessing through LLVM IR to learn how the language and compiler fit together.

Repository

Read the code, try the compiler, or follow development on GitHub.

Open HitSimple on GitHub