dullabs / bhai-lang Goto Github PK
View Code? Open in Web Editor NEWA toy programming language written in Typescript
Home Page: https://bhailang.js.org/
License: MIT License
A toy programming language written in Typescript
Home Page: https://bhailang.js.org/
License: MIT License
Import statement with the syntax as "Ye Kar lo Pehle"
Develop
Enhancement
this will be used in place of "else if"
agar bhai(condition) { // code here, for if part } ya fir bhai(another condition) { // more code here, for else if part } warna bhai{ // else part of code here }
this will help differentiate between, 2 if conditions and a single nested conditions
Bhai Lang
Enhancement
I want to add CODE_OF_CONDUCT file to this repository which is currently missing here.
Kindly assign this issue to me,.
Other
Addition, Documentation
Petition to add Ruk Ja Bhai
or Tham Ja Bhai
for break
statement 😂
Bhai Lang
Addition
Using nikal bhai for returning from a function
Bhai Lang
Enhancement
DivisionByZeroException
it shows Infinity
mere khayal se
bhai zero se divison kaha
and missing semi-colon ka
bhai semi-colon lga de
should be good......must change to something better if required
Bhai Lang
Refactoring
Wanna make it a fun thing,
So if you guys are open for contribution
Other
Others
for
try {}
catch(){}
finally{} ->
isko dekh bhai { // try block }
pakad bhai (//exception) {//exception block}
akhir me bhai {//final block }
Bhai Lang
Enhancement
Add support for beda gark
for try-catch bhai yeh kar
, beda gark
(try - catch)
bhai yeh kar
bhai ye hai a = 10;
bhai ye hai b = 10 + (15*20);
bol bhai "b is greater than a";
beda gark (err)
bol bhai err
Bhai Lang
Enhancement
It's written
hi bhai
// write code here
bye bhai
I am suggesting to change it to // bhai yaha code likh
Other
Documentation
Using dena bhai for importing any thing
Bhai Lang
Enhancement
DescriptionSupport for "gol chakkar" while true loop
Bhai Lang
Addition
The Following error text should be changed to Bhai kya kar rha hai tu to look funnier following the meme trend
Bhai Lang
Enhancement
Null pointer exception could also be renamed to for more meme potential..
Develop
Enhancement
i tried to run the project, installed turbo and ran 'turbo run dev --parallel' but local host not opening up, donno at which port is it running... can anyone help me out
This might be a complex feature to ask for but if a user want to init 10 workers or something else,
bhai 10 londa dasti ready kr
Bhai Lang
Enhancement
Markdown templates often made it difficult to capture the whole context, by expecting the contributors to read the markup, uncomment lines and delete relevant context.
Issue forms beta was released for public repositories last month, as mentioned by GitHub on this blog. We would like to migrate the issue templates to YAML-based forms which are easy to fill up and maintain, helping us capture relevant context.
Can we use this for input?
bhai sun variable
Looks like arrays are not supported yet.
Bhai Lang
Addition, Enhancement
Support for Null or Undefined!
Bhai Lang
Enhancement
This is amazing!!
We can have "Are Bhai Bhai Bhai" for error statements
Hey all, I just got to know about this today.
Right now I don't see taking input as a feature. I want to propose a "Bata bhai" or "pooch bhai" statement to take input.
What say bhai log ?
Unable to run on local system
I have gone through issue #80 , but no luck!
Please help me out with this @ankitchouhan1020
Develop
No response
Context: Scope of the entire program is statically set only once. This can potentially create a problem while re-running the code without refreshing the browser. The static scope will persist if the user doesn't refresh the browser tab.
I have observed this while testing:
While running multiple cases one after other, the variables in scope of previous test case were interfering with the current test case variables. To resolve this in testing, I did a scope reset before each test case.
Possible scenario demonstration:
Code 1:
hi bhai;
bhai ye hai a = 7;
bye bhai;
Code 2:
hi bhai;
bhai ye hai a = 30, b = 4;
bye bhai;
Let's say this code 1 runs in the browser and then user runs code 2 in the browser without refreshing the tab, the variable "a" from code 1 will persist in the scope and while running code 2, an error will be thrown.
Possible solution:
in interpret method:
interpret(code: string) {
const ast = this._parser.parse(code);
InterpreterModule.getVisitor(ast.type).visitNode(ast);
InterpreterModule.setCurrentScope(new Scope(null)); // this will make sure that scope is reset after running the code.
}
Bhai Lang
Enhancement
Currently errors like "divide by zero" gives out message as "infinity".
There is potential here to expand on this, like -
"Bhai ye kya kiya"
"Bhai aise nahi hota"
"Bhai ye kya kar diya"
Description Arre Bhai Bhai Bhai !!!
Unexpected token: "."
Not able to work with float value
bhai ye hai c = 15.1;
Bhai Lang
Enhancement
try: try kar bhai
catch:pakad bhai
finally:sab theek hai bhai
lafda: error
try kar bhai {
// kuch kaam kar bhai
} pakad bhai (lafda) {
// lag gye bhai ;-;
} sab theek hai bhai {
// aage badh
}
Bhai Lang
Enhancement
Right now, if a developer tries to add nalla or boolean type to string then its possible:
hi bhai;
bol bhai nalla + " crap";
bye bhai;
Output : "nalla crap"
hi bhai;
bol bhai sahi + " crap";
bye bhai;
Output : "sahi crap"
also, if developer tries to add nalla / boolean to number then :
hi bhai;
bol bhai nalla + 45;
bye bhai;
Output : RuntimeException: Are bhai bhai bhai.... : Ye kya kar raha hai: "+" ke sath "string" aur "number" nahi jamte.
Which is kinda misleading.
Any docs for this if provided will be helpful. Also, do mention planned features so as to contribute if possible in some way
Bhai Lang
No response
Description: Currently in the documentation examples on-site and in the playground as well we don't have the ability to copy on click,
Proposed solution: to resolve this we can add a new button at the side of pre-existing buttons like "run" and "clear" named "copy" that will help users to copy the code of the playground that he/she wrote, and for examples in documentation, we can use the similar functionality that we use for GitHub or most other documentation sites that placing a small icon at the markdown example and by clicking on that icon show "copied on clipboard" .
UI/UX
Enhancement
Hey folks,
A lot of memes related to bhailang are being shared online. If you are creating one, please share in this issue.
Les.. go! BhaiLang to the moon 🚀
As of now, there are no docs for Project setup for contributing and trying it out locally.
Let me know if help is needed.
👍 Nice Project
It would be great if the CONTRIBUTING.md file is there. So that community can get started to contribute🚀.
Add Error for run-time limit exceed with "Emotional Damage
Bhai Lang
Enhancement
Hi bro .... I want to make my final year project like this one. Can you please help me how should I do it. Which resources should i follow. Please give me the guidence.
Thank you
Bhai Lang
Others
Hey folks, great work in this.
I am curious, there is a specific reason why the Program contains an InitStatement as it's start block ?
From a brief look I have had till now, this seems it can be removed from the AST, but would love to learn more on why is this designed like this :)
Continue: aage badho bhai
Break: kat lo bhai
Requirements
Need the repository for the website.
Other
Enhancement
It will be much more indic, if we can say namaste bhai
instead of hi bhai
Bhai Lang
Enhancement
This is fun!
can we have error handling via "Kuch bhi"
I see that nalla, sahi and galat are language specific bult-in variables/macros here.
Make them _nalla, _sahi and _galat or make them all capital to differentiate them from normal variables.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.