nightshade

The nightshade programming language, compiler and tools (WIP)
Log | Files | Refs | README

plan (597B)




- attach the scope / entities (Symbols) to the AST
- attach the types (resolving types)
- lower to IR


String literal:
  Typ := Standard_String

Identifier:
  Typ := Type_Of(Entity)


1. Program / package / function / block nodes -> Scope
2. Identifier / selected-name / call callee nodes -> Entity
3. Every expression node -> Typ after typing

Reuse the AST.
Decorate it with Entity, Scope, and Type fields.
Use No_Entity / No_Scope / No_Type before the relevant phase.
Use checked accessors once a phase guarantees the field exists.
Lower to a separate IR later, not for every semantic step.