John 5d2c714bc1 conlang: Patterns...2!
- Deny arbitrary paths in patterns (only one non-keyword identifier allowed!)
- Allow patterns in for-loop binders (literally useless atm, but it's a step toward making patterns the only way to bind names.)

Next: Functions, Tuple Struct Patterns... And solving the stupid syntactic ambiguity of structors.
2025-02-22 01:00:29 -06:00
2025-02-22 01:00:29 -06:00
2025-02-20 22:05:43 -06:00
2024-04-13 03:38:32 -05:00
2023-10-30 00:07:27 -05:00
2023-10-23 21:05:51 -05:00
2024-04-22 02:06:46 -05:00

Conlang: Expression-Oriented Programming Language

This project began out of a desire to merge Rust-style control flow expressions with Python's fun for-else/while-else syntax. I fully intend to devote my spare time to conlang for the forseeable future.

Immediate Goals:

  • Decide on a minimal set of keywords and operators to support
  • Lex an entire Rust source file (minus generics, paths, and lifetimes)
  • Write expression grammar
  • Write AST for expression grammar
  • Write parser for AST
  • Create tests for parser (and AST)
  • Parse dummy.cl into a valid AST
  • Pretty printer, for debugging
  • Create minimal statement grammar
    • Variable definition statements
    • Function definition statements

Short Goals:

  • for loops and while loops can be used on the trailing side of an assignment
  • Tree-walk interpreter for prototyping and debugging
  • Data structures and sum-type enums
  • Expression type-checker
  • Pattern destructuring, to take advantage of sum-type enums
  • Three-address bytecode VM for standard library development
  • Trait/Interface system

Long Goals:

  • Minimize the number of kinds of statements
  • Compile to LLVM IR
  • Create a standard library for the language, with Rust-like abstractions.
  • Port the compiler to Conlang
Description
The Conlang programming language is an expression-based interpreted (todo: compiler) language
Readme 2.8 MiB
Languages
Rust 95.3%
C 4.7%