argee

1.0.5Β β€’Β PublicΒ β€’Β Published

πŸ“˜ About the package πŸ“˜

This is the official interpreter for the rg language.
Make sure to star the github repository!

πŸ’™ Get started πŸ’™

After installing, create a .env file, and specify the path to your .rg file. Your .env file should have something similiar to: FILE=./main.rg

Now let's code some RG! Here's an implementation of the classic fizzbuzz coding problem in rg:

i = 1

@for $i <= 100; i = $i + 1
   state = ""

   @if $i % 3 == 0 && $i % 5 == 0
       print("FizzBuzz")
       state = "yes"
   @fi

   @if $i % 3 == 0 && !$state
       print("Fizz")
       state = "yes"
   @fi

   @if $i % 5 == 0 && !$state
       print("Buzz")
       state = "yes"
   @fi

   @if !$state
       print($i)
   @fi
@rof

To get the value of a variable, write a dollar sign ($), then the name of the variable.

To run the file, run the following from the root of your project: node node_modules/argee/interpreter.js

πŸ”΅ About RG πŸ”΅

  • nested for loops and nested ifs are not supported.
  • If you do write them, you will most likely receive an unexpected result, if not a compile error.
  • There is no such thing as else or else-ifs, as rg encourages you to confidently state all possible conditions.

rg inspires to be yet another language you can add to your arsenal of skills and programming languages, then forget about it and move on in life.
rg's interpreter is written in Javascript, making it one of the slowest languages of all time.

πŸ’Ž Installation πŸ’Ž

$ npm i argee

Package Sidebar

Install

npm i argee

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

6.37 kB

Total Files

4

Last publish

Collaborators

  • ranigiterman