Releases: gauravfs-14/bhanai
v1.0.4
Release Notes for Bhanai v1.0.4
New Features
- Enhanced String Manipulation Functions:
- Introduced several powerful string functions to expand the language’s capabilities:
jodString
: Concatenate two strings.lambai
: Get the length of a string.tola
: Extract a substring.badal
: Replace a substring with another.thuloAkshar
: Convert a string to uppercase.sanoAkshar
: Convert a string to lowercase.chhaina
: Check if a substring exists.kattnu
: Split a string into an array.khaliHatau
: Trim whitespace from a string.khojnu
: Find the position of a substring.ulto
: Reverse a string.thapString
: Pad a string on the right.suruThap
: Pad a string on the left.sabdaGanna
: Count the number of words in a string.
- Introduced several powerful string functions to expand the language’s capabilities:
Improvements
-
Readability and Usability:
- All features are now logically organized and documented in a table in the README file.
- Added examples for each new feature for ease of understanding.
-
Input and Output Enhancements:
- Improved
sodhString
andsodhNumber
to ensure clean input handling and better error messages.
- Improved
-
Logical and Boolean Operations:
- Enhanced support for
ra
(AND),athawa
(OR), andhoina
(NOT) for handling complex logical conditions. - Includes examples for combining these operators in the README.
- Enhanced support for
Bug Fixes
-
Runtime Improvements:
- Fixed an issue where some undefined variables were causing unclear error messages.
- Added robust handling for nested function calls and argument evaluations.
-
String Concatenation:
- Resolved edge cases in
jodString
andbhanai
to handle mixed data types gracefully.
- Resolved edge cases in
Breaking Changes
- None.
How to Update
To update Bhanai to version v1.0.4, run:
npm install -g [email protected]
Acknowledgements
Thank you to the contributors and users for feedback and suggestions that helped shape this release. Your input is invaluable as we continue to make Bhanai better for everyone.
Feedback and Contributions
Have feedback or feature suggestions? Want to contribute? Visit the GitHub Repository.
v1.0.3
Release Notes for Bhanai v1.0.3
New Features
-
If-Else Conditional Statements:
- Introduced support for
yadi
(if),athawa
(else if), andaru
(else) for controlling program flow. - Example:
rakha("age", 15) yadi age < 18: bhanai("Timro umar kam chha.") athawa age == 18: bhanai("Timro umar 18 chha.") aru: bhanai("Timro umar thik chha.")
- Introduced support for
-
Logical Operators:
- Added support for:
ra
(AND)athawa
(OR)hoina()
(NOT)
- Example:
yadi age > 18 ra age < 60: bhanai("Timro umar kaam garna anukul chha.") yadi hoina(sachho): bhanai("This is not true.")
- Added support for:
-
Boolean Values:
- Added support for boolean literals:
sachho
(true)jutho
(false)
- Example:
rakha("isAdult", sachho) yadi isAdult: bhanai("You are an adult.")
- Added support for boolean literals:
Enhancements
-
Block Parsing Improvements:
- Enhanced indentation handling for condition blocks, ensuring proper execution of nested or indented blocks.
-
Comment Parsing:
- Improved support for inline comments (
#
andtippani
). - Multi-line comments (
""" ... """
) are now more robust.
- Improved support for inline comments (
-
Universal Argument Parsing:
- Refined the
parseArgument
function to better handle:- Nested function calls.
- Logical expressions.
- Complex conditions with comparisons.
- Refined the
Bug Fixes
- Fixed an issue where conditions (
yadi
,athawa
,aru
) were not being correctly evaluated. - Resolved a bug where indented blocks were not recognized as part of the condition block.
- Addressed edge cases in logical operator parsing for
ra
(AND) andathawa
(OR).
Breaking Changes
- None.
How to Update
To update Bhanai to version 1.0.3, use the following command:
npm install -g bhanai
Acknowledgements
A big thank you to all contributors and users who helped refine Bhanai by reporting issues and suggesting features.
For feedback and contributions, visit the GitHub Repository.
Let me know if you need further refinements! 🚀
v1.0.0
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Release Notes for v1.0.1
🎉 Initial Release of Bhanai Programming Language 🎉
The first version of Bhanai is here! This version introduces the core functionality of the Bhanai programming language, designed to make programming simple and intuitive with a Nepali touch.
Features
-
Variable Declaration:
- Use
rakha
to declare variables.
rakha("name", "Gaurab")
- Use
-
Constant Declaration:
- Use
sadai_rakha
to declare constants.
sadai_rakha("PI", 3.14159)
- Use
-
Arithmetic Operations:
- Perform basic arithmetic with built-in functions:
jod
,ghata
,guna
,bhaag
, andshesh
.
rakha("sum", jod(10, 20)) rakha("product", guna(5, 6))
- Perform basic arithmetic with built-in functions:
-
String Concatenation:
- Easily concatenate strings with
+
.
bhanai("Hello, " + name + "!")
- Easily concatenate strings with
-
Console Output:
- Print messages and variables using
bhanai
.
bhanai("Namaste, Duniya!")
- Print messages and variables using
-
Nested Function Calls:
- Combine operations in a single statement.
rakha("result", jod(5, guna(2, 3)))
-
Comments:
- Supports single-line (
#
) and multi-line comments ("""
).
# This is a single-line comment """ This is a multi-line comment """
- Supports single-line (
-
User Input:
- Accept input using
sodhString
for strings andsodhNumber
for numbers.
rakha("name", sodhString("What is your name? ")) rakha("age", sodhNumber("Enter your age: "))
- Accept input using
-
File Support:
- Save your Bhanai programs with the
.bhn
extension and execute them with thebhanai
CLI.
- Save your Bhanai programs with the
How to Use
- Install the Bhanai CLI:
npm install -g bhanai
- Run a Bhanai program:
bhanai example.bhn
What’s Next?
- Future updates will include advanced features like loops, conditionals, and custom functions.
- Open to suggestions and contributions! Feel free to submit issues or pull requests on [GitHub](https://github.com/gauravfs-14/bhanai).