Skip to content

Latest commit

 

History

History
120 lines (108 loc) · 3.92 KB

whats-next.md

File metadata and controls

120 lines (108 loc) · 3.92 KB

Stage 0: Absolute basics

Completed

  • Lexer
  • Parser
  • AST nodes
  • Function prototype
  • Function body
  • Return value
  • JIT compiler
  • Basic types: i/u32/64, f32/64
  • Math (+, - , *, /, +=, -=)
    • // (integer-only division, always returns an int of some kind)
  • Multi-statement procedures
  • Load from file (primitive)
  • Detailed error messages
    • Including lexer/parser error handling
  • Function calls
    • Anonymous calls in CLI
  • if/else (yields expression)
  • when/else (yields result of test)
  • Comparison ops (==, !=, <, >, <=, >=, and, or)
    • also bitwise and/or by way of & and | ops
  • Unary ops
    • (-) - numerical (bitwise)
    • (not) - logical (i1 result)
  • Variable declarations, assignment, retrieval
    • Declaration/init
    • Retrieval
    • Assignment
  • Loop constructions
    • Var inside and outside of loops
    • break to exit from blocks
    • Autoincrement/assume infinite loop
  • Loaded programs and REPL use different JITs to allow efficient code reuse
  • with context for variables
  • Test suite
    • Lexer
    • Parser
    • Compiler
    • Compile to standalone binary
  • Default function argument values
  • Color-coded output in REPL
  • Store Aki-native type signatures as LLVM metadata
  • Pointers and pointer types, mainly for compatibility with C right now
    • ref/deref (to create and dereference pointers)
    • Pointer comparisons
    • Pointer math (may require its own type)
  • Function type (for function pointers)
    • Function pointer type
    • String constants
  • Comments
  • Extract C-compatible data from Aki structures
  • External function references (extern keyword)
  • cast
    • Unsafe cast
    • Casting int to pointer and back (unsafe only)
  • Inline typing for constants
    • True/False for bool values
    • 0x00 and 0h00 for unsigned and signed values, respectively
    • Inline constant type declarations (e.g., 4096:u_size)
  • unsafe context block for certain operations
  • Variable argument functions (for compatibility with C calls)
  • String escape characters (e.g., \x00 for inline hex)
    • Escaped quoting ('It\'s a quote!')
    • Escape slashes (\\ = \)
  • Array type
    • Support for objects in arrays
    • N-dimensional arrays of scalars
  • uni for globals
  • case statement for matching against constant enums (including type enumerators)
  • while expressions
  • const for constants
  • Decorators by way of the @ symbol
    • inline/noinline for functions

In progress

  • Compile-time computation of constants and values for uni assignments
  • Classes and object structures
    • Object methods and method calls
  • Type declarations (aliases)
  • print builtin
  • meta keyword for program metadata (compiler directives, etc.)
  • Complete REPL command set (as per earlier incarnation of project)
  • CLI command support
  • Compile to standalone binary, maybe with lld instead of the platform linker
  • Type conversions

Stage 1: Advanced variables and structures

  • Slices
  • Enums
  • Iterables by way of object methods
  • String operations
    • String slices
  • Call chains

Stage 2: Advanced error handling

  • Error/option types

Stage 3: Modules

  • Module imports

Stage 4: Other stuff

  • Container objects
  • Lists
    • Prereq for functions that take arbitrary numbers of arguments (since they are just list objects)
  • Dictionaries/hashmaps
    • Prereq for functions that take named arguments (since they are just dicts with string keys)
  • Sets
  • Auto-conversion rules for scalars?

Stage 5: Beyond The Impossible (for me right now, anyway)

  • Garbage collection
  • Use existing C headers as-is
  • Threading, actors, coroutines, etc.