# uralstech/ezrsquared architecture

> Architecture diagram of the GitHub repository uralstech/ezrsquared, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uralstech/ezrsquared
- Repository: https://github.com/uralstech/ezrsquared

## Overview

Key Components to Include:

##### Core Language Components
- Class hierarchy from the Classes directory:
- Errors.cs (Error handling)
- General.cs (General utilities)
- Helpers.cs (Helper functions)
- Nodes.cs (AST nodes)
- Values.cs (Value types)

##### Standard Libraries
- IO Library (Libraries/io)
- Standard Library (Libraries/std)

##### Shell Interface
- EzrShell.cs as the REPL/interactive component

##### Testing Framework
- Tests directory with various test files

##### Connection Types
- Double lines: Data flow

##### Component Relationships
- [Shell Interface] → [Interpreter Core] → [AST Nodes]
- ↓
- [Standard Library] ← [Value System] → [Error Handler]
- [IO Library]      ←

##### Specific Elements
- Input handling flow
- Parsing pipeline
- AST generation
- Execution flow
- Error propagation
- Standard library integration
- IO operations flow

##### Additional Details
- Version information from Constants.cs
- Integration points with test framework
- Documentation links

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Shell
        REPL[Shell Interface/REPL]:::interface
    end

    subgraph Core
        INT[Interpreter Core]:::core
        AST[AST System]:::core
        PARSER[Parser]:::core
        EXEC[Executor]:::core
        VALUES[Value System]:::core
    end

    subgraph Libraries
        STD[Standard Library]:::library
        IO[IO Library]:::library
    end

    subgraph Support
        ERR[Error Handler]:::error
        GEN[General Utilities]:::support
        HELP[Helper Functions]:::support
        CONST[Version Info]:::support
    end

    subgraph Testing
        TEST[Test Framework]:::test
    end

    subgraph Documentation
        DOCS[Documentation]:::docs
    end

    %% Relationships
    REPL --> INT
    INT --> PARSER
    PARSER --> AST
    AST --> EXEC
    EXEC --> VALUES
    VALUES --> STD
    VALUES --> IO
    INT --> ERR
    INT --> GEN
    INT --> HELP
    TEST --> INT
    
    %% Click Events
    click REPL "https://github.com/Uralstech/ezrSquared/blob/master/ezrShell.cs"
    click INT "https://github.com/Uralstech/ezrSquared/blob/master/ezr.cs"
    click ERR "https://github.com/Uralstech/ezrSquared/blob/master/Classes/Errors.cs"
    click GEN "https://github.com/Uralstech/ezrSquared/blob/master/Classes/General.cs"
    click HELP "https://github.com/Uralstech/ezrSquared/blob/master/Classes/Helpers.cs"
    click AST "https://github.com/Uralstech/ezrSquared/blob/master/Classes/Nodes.cs"
    click VALUES "https://github.com/Uralstech/ezrSquared/blob/master/Classes/Values.cs"
    click IO "https://github.com/Uralstech/ezrSquared/blob/master/Libraries/io/IO.cs"
    click STD "https://github.com/Uralstech/ezrSquared/blob/master/Libraries/std/STD.cs"
    click TEST "https://github.com/Uralstech/ezrSquared/tree/master/Tests/"
    click CONST "https://github.com/Uralstech/ezrSquared/blob/master/Constants.cs"
    click DOCS "https://github.com/Uralstech/ezrSquared/tree/master/docs/"

    %% Styling
    classDef core fill:#a8d1f0,stroke:#333
    classDef interface fill:#ffeb99,stroke:#333
    classDef library fill:#90EE90,stroke:#333
    classDef error fill:#ffb3b3,stroke:#333
    classDef support fill:#e6e6e6,stroke:#333
    classDef test fill:#d9b3ff,stroke:#333
    classDef docs fill:#ffd9b3,stroke:#333

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Interface]:::interface
        L3[Libraries]:::library
        L4[Error Handling]:::error
        L5[Support Utilities]:::support
        L6[Testing]:::test
        L7[Documentation]:::docs
    end
```
