# nuistmrchest/oblivia_release architecture

> Architecture diagram of the GitHub repository nuistmrchest/oblivia_release, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nuistmrchest/oblivia_release
- Repository: https://github.com/nuistmrchest/oblivia_release
- Video tour (about a minute): https://gitdiagram.com/nuistmrchest/oblivia_release/video

## Overview

Oblivia is an interpreted scripting language with file execution and an interactive REPL. The main workflow accepts source, tokenizes it, builds and executes statements, evaluates expressions, and operates on typed runtime values and scoped variables. Statement implementations cover control flow, input/output, functions, references, and includes; the REPL also exposes variable and scope commands. Relationships below follow the sampled source index and README; unsampled statement details are grouped by their existing implementation directory.

Main entry points: [`TypeSystem/implement/variable.cpp`](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/variable.cpp) (Scoped variables), [`Expression/implement/expression.cpp`](https://github.com/nuistmrchest/oblivia_release/blob/main/Expression/implement/expression.cpp) (Expression evaluator), [`implement/interpreter.cpp`](https://github.com/nuistmrchest/oblivia_release/blob/main/implement/interpreter.cpp) (File interpreter), [`implement/repl.cpp`](https://github.com/nuistmrchest/oblivia_release/blob/main/implement/repl.cpp) (Interactive REPL)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry modes"]
  node_main["Program entry<br/>[main.cpp]"]
  node_file["File interpreter<br/>[interpreter.cpp]"]
  node_repl["Interactive REPL<br/>[repl.cpp]"]
end

subgraph group_language["Language processing"]
  node_tokenizer["Tokenizer<br/>[tokenize.cpp]"]
  node_checker["Token checker<br/>[checker.cpp]"]
  node_expression["Expression evaluator<br/>[expression.cpp]"]
end

subgraph group_runtime["Execution runtime"]
  node_statements["Statement execution"]
  node_situation["Execution status<br/>[situation.cpp]"]
end

subgraph group_values["Runtime values"]
  node_variables[("Scoped variables<br/>[variable.cpp]")]
  node_arrays["Arrays<br/>[array.cpp]"]
  node_objects["Objects<br/>[object.cpp]"]
  node_numbers["Numbers<br/>[number.cpp]"]
  node_strings["Strings<br/>[string.cpp]"]
  node_references["References<br/>[reference.cpp]"]
  node_operators["Operators<br/>[operator.cpp]"]
  node_functions["Functions<br/>[function.cpp]"]
end

node_user(("Script user"))

node_user -->|"starts"| node_main
node_main -->|"runs files"| node_file
node_main -->|"starts REPL"| node_repl
node_file -->|"tokenizes source"| node_tokenizer
node_file -->|"executes statements"| node_statements
node_file -->|"evaluates expressions"| node_expression
node_repl -->|"tokenizes input"| node_tokenizer
node_repl -->|"executes statements"| node_statements
node_repl -->|"evaluates expressions"| node_expression
node_tokenizer -->|"checks tokens"| node_checker
node_tokenizer -->|"recognizes expressions"| node_expression
node_statements -->|"evaluates conditions"| node_expression
node_statements -->|"updates bindings"| node_variables
node_expression -->|"resolves values"| node_variables
node_expression -.->|"applies operators"| node_operators
node_variables -->|"stores values"| node_arrays
node_variables -->|"stores values"| node_objects
node_variables -->|"stores values"| node_numbers
node_variables -->|"stores values"| node_strings
node_variables -->|"stores values"| node_references
node_variables -->|"stores values"| node_functions
node_arrays -->|"contains elements"| node_variables
node_objects -->|"contains attributes"| node_variables
node_references -->|"references bindings"| node_variables

click node_main "https://github.com/nuistmrchest/oblivia_release/blob/main/main.cpp"
click node_file "https://github.com/nuistmrchest/oblivia_release/blob/main/implement/interpreter.cpp"
click node_repl "https://github.com/nuistmrchest/oblivia_release/blob/main/implement/repl.cpp"
click node_tokenizer "https://github.com/nuistmrchest/oblivia_release/blob/main/Tokenize/implement/tokenize.cpp"
click node_checker "https://github.com/nuistmrchest/oblivia_release/blob/main/Tokenize/implement/checker.cpp"
click node_expression "https://github.com/nuistmrchest/oblivia_release/blob/main/Expression/implement/expression.cpp"
click node_statements "https://github.com/nuistmrchest/oblivia_release/tree/main/Statement/implement"
click node_situation "https://github.com/nuistmrchest/oblivia_release/blob/main/Situation/implement/situation.cpp"
click node_variables "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/variable.cpp"
click node_arrays "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/array.cpp"
click node_objects "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/object.cpp"
click node_numbers "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/number.cpp"
click node_strings "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/string.cpp"
click node_references "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/reference.cpp"
click node_operators "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/operator.cpp"
click node_functions "https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/function.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_file,node_repl,node_user toneBlue
class node_tokenizer,node_checker,node_expression toneAmber
class node_statements,node_situation toneMint
class node_variables,node_arrays,node_objects,node_numbers,node_strings,node_references,node_operators,node_functions toneRose
```

## Components

### Entry modes

- [Program entry](https://github.com/nuistmrchest/oblivia_release/blob/main/main.cpp): `main.cpp`
- [File interpreter](https://github.com/nuistmrchest/oblivia_release/blob/main/implement/interpreter.cpp): `implement/interpreter.cpp`
- [Interactive REPL](https://github.com/nuistmrchest/oblivia_release/blob/main/implement/repl.cpp): `implement/repl.cpp`

### Language processing

- [Tokenizer](https://github.com/nuistmrchest/oblivia_release/blob/main/Tokenize/implement/tokenize.cpp): `Tokenize/implement/tokenize.cpp`
- [Token checker](https://github.com/nuistmrchest/oblivia_release/blob/main/Tokenize/implement/checker.cpp): `Tokenize/implement/checker.cpp`
- [Expression evaluator](https://github.com/nuistmrchest/oblivia_release/blob/main/Expression/implement/expression.cpp): `Expression/implement/expression.cpp`

### Execution runtime

- [Statement execution](https://github.com/nuistmrchest/oblivia_release/tree/main/Statement/implement): `Statement/implement`
- [Execution status](https://github.com/nuistmrchest/oblivia_release/blob/main/Situation/implement/situation.cpp): `Situation/implement/situation.cpp`

### Runtime values

- [Scoped variables](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/variable.cpp): `TypeSystem/implement/variable.cpp`
- [Arrays](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/array.cpp): `TypeSystem/implement/array.cpp`
- [Objects](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/object.cpp): `TypeSystem/implement/object.cpp`
- [Numbers](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/number.cpp): `TypeSystem/implement/number.cpp`
- [Strings](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/string.cpp): `TypeSystem/implement/string.cpp`
- [References](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/reference.cpp): `TypeSystem/implement/reference.cpp`
- [Operators](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/operator.cpp): `TypeSystem/implement/operator.cpp`
- [Functions](https://github.com/nuistmrchest/oblivia_release/blob/main/TypeSystem/implement/function.cpp): `TypeSystem/implement/function.cpp`

### Other components

- **Script user**

## Connections

- Script user → Program entry: starts (evidence: `README.md`)
- Program entry → File interpreter: runs files (evidence: `main.cpp`)
- Program entry → Interactive REPL: starts REPL (evidence: `main.cpp`)
- File interpreter → Tokenizer: tokenizes source (evidence: `implement/interpreter.cpp`)
- File interpreter → Statement execution: executes statements (evidence: `implement/interpreter.cpp`)
- File interpreter → Expression evaluator: evaluates expressions (evidence: `implement/interpreter.cpp`)
- Interactive REPL → Tokenizer: tokenizes input (evidence: `implement/repl.cpp`)
- Interactive REPL → Statement execution: executes statements (evidence: `implement/repl.cpp`)
- Interactive REPL → Expression evaluator: evaluates expressions (evidence: `implement/repl.cpp`)
- Tokenizer → Token checker: checks tokens (evidence: `Tokenize/implement/tokenize.cpp`)
- Tokenizer → Expression evaluator: recognizes expressions (evidence: `Tokenize/implement/tokenize.cpp`)
- Statement execution → Expression evaluator: evaluates conditions (evidence: `Statement/implement/if.cpp`)
- Statement execution → Scoped variables: updates bindings (evidence: `TypeSystem/implement/variable.cpp`)
- Expression evaluator → Scoped variables: resolves values (evidence: `Expression/implement/expression.cpp`)
- Expression evaluator → Operators: applies operators
- Scoped variables → Arrays: stores values (evidence: `TypeSystem/implement/variable.cpp`)
- Scoped variables → Objects: stores values (evidence: `TypeSystem/implement/variable.cpp`)
- Scoped variables → Numbers: stores values (evidence: `TypeSystem/implement/variable.cpp`)
- Scoped variables → Strings: stores values (evidence: `TypeSystem/implement/variable.cpp`)
- Scoped variables → References: stores values (evidence: `TypeSystem/implement/variable.cpp`)
- Scoped variables → Functions: stores values (evidence: `TypeSystem/implement/variable.cpp`)
- Arrays → Scoped variables: contains elements (evidence: `TypeSystem/implement/array.cpp`)
- Objects → Scoped variables: contains attributes (evidence: `TypeSystem/implement/object.cpp`)
- References → Scoped variables: references bindings (evidence: `TypeSystem/implement/reference.cpp`)
