How akene-uzezi/bwh-rust works
bwh-rust is a small Rust implementation of the badwhipp language’s front end. Its principal interactive workflow is stdin input through the REPL, which tokenizes each line and prints tokens; the library also exposes a parser that builds statement ASTs. Token definitions and keyword lookup support both stages. The parser currently recognizes let and return statements, but does not populate their expression values. The graph reflects the shown implementation and README; no evaluator or runtime execution stage is present.
Main entry points: token.rs Token Types · parser.rs Recursive Parser · repl.rs Token REPL · lexer.rs Lexer
Components 7
Interactive CLI
- Binary Entry
src/main.rs - Token REPL
src/repl.rs
Language Front End
- Lexer
src/lexer.rs - Recursive Parser
src/parser.rs
Syntax Model
- Token Types
src/token.rs - Statement AST
src/ast.rs
Other components
- CLI User
Connections 9
- CLI User → Binary Entry: starts CLI
README.md - Binary Entry → Token REPL: starts
src/main.rs - Token REPL → Lexer: tokenizes lines
src/repl.rs - Token REPL → Token Types: checks EOF
src/repl.rs - Lexer → Token Types: classifies tokens
src/lexer.rs - Recursive Parser → Lexer: reads tokens
src/parser.rs - Recursive Parser → Token Types: checks token types
src/parser.rs - Recursive Parser → Statement AST: builds statements
src/parser.rs - Statement AST → Token Types: stores tokens
src/ast.rs