Files: maithili_dsl/transpiler/mappings.py, maithili_dsl/transpiler/linter.py:38
There is no elif mapping, and writing the natural construct produces invalid Python:
Input: नहि त यदि क > ५:
Output: else if क > 5: # SyntaxError at runtime
(Verified against v0.3.0 — नहि त → else and यदि → if are substituted independently.)
Fix:
- Add
"नहि त यदि": "elif" to DEVNAGIRI_KEYWORD_MAP — ⚠️ it must be inserted before "नहि त" in the dict, because patterns are applied in insertion order and the longer phrase must win.
- The linter already tolerates
नहि त ... यदि lines (linter.py:40), so no linter change should be needed — but add a linter test to prove it.
Tests: transpile test for a full यदि / नहि त यदि / नहि त chain; smoke-test an example using it.
Good first issue — the whole fix is one dict entry placed correctly, plus tests. Native speakers: if a different phrase than नहि त यदि is more natural for elif, please raise it here before implementing.
Files:
maithili_dsl/transpiler/mappings.py,maithili_dsl/transpiler/linter.py:38There is no
elifmapping, and writing the natural construct produces invalid Python:(Verified against v0.3.0 —
नहि त→elseandयदि→ifare substituted independently.)Fix:
"नहि त यदि": "elif"toDEVNAGIRI_KEYWORD_MAP—"नहि त"in the dict, because patterns are applied in insertion order and the longer phrase must win.नहि त ... यदिlines (linter.py:40), so no linter change should be needed — but add a linter test to prove it.Tests: transpile test for a full
यदि / नहि त यदि / नहि तchain; smoke-test an example using it.Good first issue — the whole fix is one dict entry placed correctly, plus tests. Native speakers: if a different phrase than
नहि त यदिis more natural for elif, please raise it here before implementing.