object Lang {
fun init(name) {
puts("called when object is created")
}
fun name {
return "Iracema"
}
}
l = Lang.new
puts(l.name)
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 |
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 |
-
Verify that you have Go 1.17+ installed
$ go version
If
go
is not installed, follow instructions on the Go website. -
Clone this repository
$ https://github.com/alissonbrunosa/iracema $ cd iracema
-
Build
$ go build cmd/iracema/main.go -o iracema