Skip to content

Releases: gauravfs-14/bhanai

v1.0.4

15 Dec 23:01
Compare
Choose a tag to compare

Release Notes for Bhanai v1.0.4

New Features

  1. 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.

Improvements

  1. 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.
  2. Input and Output Enhancements:

    • Improved sodhString and sodhNumber to ensure clean input handling and better error messages.
  3. Logical and Boolean Operations:

    • Enhanced support for ra (AND), athawa (OR), and hoina (NOT) for handling complex logical conditions.
    • Includes examples for combining these operators in the README.

Bug Fixes

  1. Runtime Improvements:

    • Fixed an issue where some undefined variables were causing unclear error messages.
    • Added robust handling for nested function calls and argument evaluations.
  2. String Concatenation:

    • Resolved edge cases in jodString and bhanai to handle mixed data types gracefully.

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

15 Dec 21:08
Compare
Choose a tag to compare

Release Notes for Bhanai v1.0.3


New Features

  1. If-Else Conditional Statements:

    • Introduced support for yadi (if), athawa (else if), and aru (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.")
      
  2. 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.")
      
  3. Boolean Values:

    • Added support for boolean literals:
      • sachho (true)
      • jutho (false)
    • Example:
      rakha("isAdult", sachho)
      yadi isAdult:
          bhanai("You are an adult.")
      

Enhancements

  1. Block Parsing Improvements:

    • Enhanced indentation handling for condition blocks, ensuring proper execution of nested or indented blocks.
  2. Comment Parsing:

    • Improved support for inline comments (# and tippani).
    • Multi-line comments (""" ... """) are now more robust.
  3. Universal Argument Parsing:

    • Refined the parseArgument function to better handle:
      • Nested function calls.
      • Logical expressions.
      • Complex conditions with comparisons.

Bug Fixes

  1. Fixed an issue where conditions (yadi, athawa, aru) were not being correctly evaluated.
  2. Resolved a bug where indented blocks were not recognized as part of the condition block.
  3. Addressed edge cases in logical operator parsing for ra (AND) and athawa (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

15 Dec 03:44
Compare
Choose a tag to compare

Full Changelog: v1.0.1...v1.0.2

v1.0.1

15 Dec 03:15
Compare
Choose a tag to compare

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

  1. Variable Declaration:

    • Use rakha to declare variables.
    rakha("name", "Gaurab")
    
  2. Constant Declaration:

    • Use sadai_rakha to declare constants.
    sadai_rakha("PI", 3.14159)
    
  3. Arithmetic Operations:

    • Perform basic arithmetic with built-in functions: jod, ghata, guna, bhaag, and shesh.
    rakha("sum", jod(10, 20))
    rakha("product", guna(5, 6))
    
  4. String Concatenation:

    • Easily concatenate strings with +.
    bhanai("Hello, " + name + "!")
    
  5. Console Output:

    • Print messages and variables using bhanai.
    bhanai("Namaste, Duniya!")
    
  6. Nested Function Calls:

    • Combine operations in a single statement.
    rakha("result", jod(5, guna(2, 3)))
    
  7. Comments:

    • Supports single-line (#) and multi-line comments (""").
    # This is a single-line comment
    """
    This is a multi-line
    comment
    """
    
  8. User Input:

    • Accept input using sodhString for strings and sodhNumber for numbers.
    rakha("name", sodhString("What is your name? "))
    rakha("age", sodhNumber("Enter your age: "))
    
  9. File Support:

    • Save your Bhanai programs with the .bhn extension and execute them with the bhanai CLI.

How to Use

  1. Install the Bhanai CLI:
    npm install -g bhanai
  2. Run a Bhanai program:
    bhanai example.bhn

What’s Next?