Write code in Bangla. Compile to JavaScript. Build with modern developer tools.
BN Script is an open-source programming language that combines Bangla-inspired syntax with the power of JavaScript.
It compiles directly to JavaScript and ships with a custom VS Code extension featuring syntax highlighting, autocomplete, hover documentation, diagnostics, and developer tooling.
Whether you're learning programming, exploring compiler design, or building developer tools, BN Script provides a familiar yet unique coding experience.
Most programming languages are designed around English keywords.
BN Script explores a different idea:
dhori nam = "Risat"
jodi nam == "Risat" {
dekhi "Welcome!"
}
while still supporting:
let name = "Risat"
if (name == "Risat") {
print("Welcome!")
}
This means developers can use Bangla-inspired syntax, English syntax, or a mix of both.
dhori nam = "Risat"
sthir version = "0.1.0"
or
let name = "Risat"
const version = "0.1.0"
kaj greet(user) {
dekhi user
}
jodi score >= 90 {
dekhi "Excellent"
} nahole {
dekhi "Keep Learning"
}
bar member ekti team {
dekhi member
}
dhori developers = [
{ nam: "Risat", score: 95 },
{ nam: "Rahim", score: 88 }
]
await wait(1000)
dekhi "Done"
amdani { greet } theke "./utils"
roptani kaj hello() {
dekhi "Hello"
}
dhoro {
dekhi "Trying..."
} error err {
dekhi err
} sheshe {
dekhi "Done"
}
BN Script includes a dedicated VS Code extension.
✅ Syntax Highlighting
✅ Autocomplete
✅ Hover Documentation
✅ Bilingual Diagnostics
✅ Problems Panel Integration
✅ Check / Build / Run Commands
✅ VSIX Packaging
BN Script keywords are highlighted automatically.
Supported categories:
- Keywords
- Strings
- Numbers
- Functions
- Imports / Exports
- Runtime Helpers
- Operators
- Comments
Suggestions appear while typing:
dho...
Suggestions:
dhori
dhoroor
asy...
Suggestions:
async
awaitHover over:
dhori
kaj
await
amdani
roptani
to view language documentation directly inside VS Code.
BN Script provides bilingual diagnostics.
Example:
Variable "user" age declare kora hoyni.Variable "user" is not declared.Prothome variable declare korun.Diagnostics appear as:
- Red Squiggles
- Problems Panel Entries
- Click-to-Navigate Errors
BN Script source:
dekhi "Hello BN Script"
Generated JavaScript:
console.log("Hello BN Script");git clone https://github.com/sayedrisat/bnscript.git
cd bnscript
npm installValidate syntax and semantics:
node src/cli.js check examples/hello.bnGenerate JavaScript output:
node src/cli.js build examples/hello.bnExecute BN Script:
node src/cli.js run examples/hello.bnor
node src/cli.js examples/hello.bnInteractive shell:
node src/cli.js replBuild VSIX:
npm run build:vsixGenerated file:
dist/bnscript-0.1.0-alpha.0.vsixInstall:
- Open VS Code
- Extensions (
Ctrl + Shift + X) - Click
... - Install from VSIX
- Select generated file
- Reload VS Code
- Bangla-inspired syntax
- Familiar English aliases
- Compiles to JavaScript
- Modern async support
- Module system
- REPL
- VS Code integration
- Open Source
- Beginner friendly
- Compiler design learning resource
- Alpha release
- No LSP yet
- No code actions yet
- No semantic highlighting yet
- No workspace symbol navigation
- Marketplace publication pending
- Ecosystem still growing
Current Status:
298 / 298 Tests PassingTest Suite Covers:
- Lexer
- Parser
- Semantic Analyzer
- Generator
- Runtime Helpers
- CLI
- REPL
- VS Code Extension
- Diagnostics
- Integration Tests
Run tests:
npm test- Compiler Pipeline
- Modules
- Async / Await
- Top-Level Await
- Runtime Helpers
- REPL
- VS Code Extension
- Diagnostics
- Autocomplete
- Hover Documentation
- Global CLI (
bn) - Marketplace Publishing
- Incremental Diagnostics
- Code Actions
- LSP
- Symbol Navigation
Contributions are welcome.
Please check:
- Issues
- Discussions
- CONTRIBUTING.md
MIT License
Built with ❤️ by Sayed Risat