Skip to content

Latest commit

 

History

477 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polyscript

Polyscript is a Rust-like toy language with static typing, reference counting, and an LLVM AOT compiler.


Documentation Structure

The documentation comes in two parts. The guide introduces the language in order, and is meant to be read from beginning to end — each chapter uses only what the chapters before it have established. The reference holds the exhaustive tables, and is meant to be looked things up in.

The Guide

  1. Syntax and Basics: Comments, primitive types, literals, operators, variables, casting, and sizeof.
  2. Control Flow: Blocks, if-else expressions, for and while loops.
  3. Functions: Declarations, parameters, divergence, function expressions and types, and closures.
  4. Structs and Enums: Building compound types, field visibility, discriminants, and type aliases.
  5. Implementations: Attaching methods, constants, and associated types to a type.
  6. Traits: Shared behavior, path qualifiers, operator overloading, and Drop.
  7. Generics: Type parameters, constraints, and monomorphization.
  8. Memory Model: Copy and heap types, reference counting, destruction, and raw memory.
  9. Modules: Code organization using import and export.

The Reference

Internals

  • Compiler Internals: An explanation of the compiler's architecture and compilation pipeline.

Usage

After compiling the compiler into an executable ./polyscriptcc, running ./polyscriptcc --help will give further instructions as to how to compile a Polyscript program. The native standard library is provided here.

About

A Rust-like toy language with reference counting and an LLVM AOT compiler.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages