$ show Kalaam-Programming-Language/Kalaam
Kalaam is a Vue 2 single-page web application and online IDE for the Kalaam programming language, a Hindi/Devanagari-script language with loops, functions, conditionals, arrays, and print/input primitives. The app provides documentation pages, an examples gallery, and a CodeMirror-based practice editor with standard run mode and a line-by-line learning mode. It is a static frontend with no backend; it is configured for SPA hosting via public/_redirects and embeds Google Tag Manager in the HTML entry point. Under the hood the repository ships a complete custom interpreter in src/lib: a scanner classifies source tokens, PushTokens constructs a token array, and Scripts/main.js interprets assignments, conditions, for/while loops, functions, arrays, and print statements against an in-memory variable store. The interpreter is essentially a tree-walking evaluator that relies heavily on JavaScript eval(), uses browser prompt() for user input, and generates Hindi execution-stack explanations for educational output. Notably, the live Practice.vue imports Compile and KalaamKeywords from the external 'kalaam' npm package, while the Jest tests exercise the local src/lib/Compiler/main.js instead, creating a split between the tested compiler and the compiler actually used by the app. The codebase is functional for the bundled examples but shows significant engineering debt: duplicate compiler trees under src/lib/Interpretor(temp), global Array.prototype mutation, dead code, legacy Vue 2/Quasar 1 dependencies, and heavy coupling between interpreter modules. The main reusable value is in the language-tooling pieces, such as the CodeMirror mode, token scanner, and source-normalization utilities. Overall this is best viewed as an educational/experimental language project rather than a cleanly architected production codebase.
The LLM identified 4 files worth highlighting for reuse:
A deterministic token classifier for the Kalaam language. It takes the cleaned source token array and current index, then chains predicate functions from TypeCheck and AdvancedTypeCheck to return a token type such as VARIABLE, NUMBER, FOR_LOOP, or REALTIME_PRINT. This separation of lexical classification from interpretation makes it extractable for any Kalaam tooling, such as linters, formatters, or other editor integrations.
A self-contained CodeMirror mode definition for Kalaam syntax highlighting. It extends the CodeMirror JavaScript mode with Hindi/Devanagari keywords like เคฆเคฟเคเคพเค, เค เคเคฐ, เคฆเฅเคนเคฐเคพเค, and เคเคฌเคคเค, and registers MIME types for the language. It can be dropped into any browser project using CodeMirror without importing the rest of the Kalaam application.
Provides factory functions that reconstruct logical units from a raw token stream: BuildString reassembles split string literals, BuildArray reassembles array literals, and BuildCondition reassembles if/while conditions. The file has no internal project imports, making the token-reconstruction pattern isolated and reusable for parser front-ends or source-analysis tools.
A pure source-code normalization routine for Kalaam source text. It canonicalizes spacing around keywords, collapses newlines, removes parsing-noise characters, and splits source into a token array. Since it imports nothing from the rest of the repo, it can be lifted directly into another Kalaam tool or used as a template for localized-language preprocessing in other projects.