How nixhantb/hashlang works
HashLang is a small command-line interpreter. A user enters a command in the interactive loop; the loop tokenizes it, parses the tokens, and dispatches the parsed command to the evaluator. The evaluator handles printing and assignments, evaluates integer expressions, and reads or updates its variable dictionary. The README also describes exit handling, which the loop implements directly. The parser produces a command-and-arguments tuple rather than the AST described in the README; the graph follows the sampled implementation.
Main entry points: Program.cs Interactive Loop · Evaluater.cs Command Evaluator · Lexer.cs Tokenizer · Parser.cs Command Parser
Components 6
Command Interface
- Interactive Loop
Program.cs
Language Front End
- Tokenizer
src/Lexer/Lexer.cs - Command Parser
src/Parser/Parser.cs
Execution Runtime
- Command Evaluator
src/Core/Evaluater.cs - Variable Store
src/Core/Evaluater.cs
Other components
- User
Connections 7
- User → Interactive Loop: enters commands
README.md - Interactive Loop → User: prompts and reports
Program.cs - Interactive Loop → Tokenizer: tokenizes input
Program.cs - Interactive Loop → Command Parser: parses tokens
Program.cs - Interactive Loop → Command Evaluator: evaluates parsed command
Program.cs - Command Evaluator → Variable Store: reads and writes
src/Core/Evaluater.cs - Command Evaluator → User: prints results
src/Core/Evaluater.cs