Skip to content

WIP #1

@toyboot4e

Description

@toyboot4e

Let's make it a real thing :)

1. Primitive language (WIP)

1-1. Frontend IR

  • Parse Item s
  • Lower procedure Body
  • Collect Body expressions and patterns into ExprScopeMap
  • Collect ItemScope and ExprScopeMap into Resolver

1-2. Simple type inference

  • Add type data subtable to procedure body: TypeTable
  • Infer types
  • Resolve paths to items and retrieve their types

1-3. Simple langauge features

  • Local variables (let)
  • i32, f32 and builtin operators
  • bool
  • Control flow 1 (when, unless, cond, while)
  • Explicit block scope (do)
  • User-defined procedures
  • Procedure call
  • Annotate procedure parameter types
  • return
  • Control flow 2 (loop, continue, break)
  • String literals
  • GC
  • Print functions
  • Assertions

1-4. Utilities

  • Debug representation of patterns and expressions
  • Accumulate diagnostics in each path
  • Rendering diagnostics

1-5. Basic IDE support

  • Diagnostics
  • Go to definition
  • Rename symbol
  • Inlay hints

1-6. More IRs

  • Validated IR?
  • BIR? (MIR-like CFG-based IR, but also for frontend)

2. Extendible the language (TODO)

2-1. User-defined types

  • Struct syntax support
  • Allow field access with dots (Path)

2-2. Missing features

  • Global variables
  • Pure functions (fn)
  • Inner items
  • Comprehensive match

2-3. Generics

  • Generic types, generic type inference
  • Generic function
  • Array
  • Map

2-4. Modules

  • Inline module (mod special form)
  • Visibility
  • Import resolution
  • Handle name resolution operators (:: or maybe .)

2-5. Macro support

  • Macro syntax
  • Virtual files originated from macros
  • Macro expansion pass

2-6. Multi file support

  • External modules
  • IDE support

3. More IDE features (TODO)

3-1. Features

  • Completions
  • Code snippets
  • Search symbols

3-2. Optimizations

  • Faster re-parse?

3-3. LSP

  • tower_lsp

4. Scripting features

  • Coroutines
  • Matching over macro inputs
  • Rust bindings(Vec, HashMap, etc.)
  • Typed path variables (over asset paths)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions