Skip to content

Latest commit

 

History

History
85 lines (66 loc) · 1.63 KB

README.md

File metadata and controls

85 lines (66 loc) · 1.63 KB

Iracema

Syntax

object Lang {
  fun init(name) {
    puts("called when object is created")
  }

  fun name {
    return "Iracema"
  }
}

l = Lang.new
puts(l.name)

Arithmetic Operators

Following table shows all the arithmetic operators supported by Iracema. Assume variable A holds 10 and variable B holds 20 then

Operator Description Example
+ Adds two operands A + B will give 30
- Subtracts second operand from the first A - B will give -10
* Multiply both operands A * B will give 200
/ Divide numerator by de-numerator B / A will give 2
- Unary - operator acts as negation -A will give -10

Keywords

The following list shows a few of the reserved words in Iracema. These reserved words may not be used as constants or variables or any other identifier names.

object fun catch return stop next switch super and
if else while true false nil case default or

Installation from source

  1. Verify that you have Go 1.17+ installed

    $ go version

    If go is not installed, follow instructions on the Go website.

  2. Clone this repository

    $ https://github.com/alissonbrunosa/iracema
    $ cd iracema
  3. Build

    $  go build cmd/iracema/main.go -o iracema