Skip to content

Brilliant Language

Kamil Adam edited this page Aug 21, 2023 · 5 revisions

Simple language inspireted Fruit Language and HaPyli.

Brilliant Language has:

  • Macros
  • Procedures
  • Pointers

Macros

@someMacro (param1 param2 param3) {

}

Procedures

Basic Syntax

; someProcedure \[param1 param2 param3] {
  ; result1 `someProcedure1 [param1]
  ; result2 `someProcedure2 [param2]
  ; result3 `someProcedure3 [param3]
  [result1 result2 result3]
}

Definition

; nameOfDefiniotion bodyOfDefiniotion

Abstraction

\[param1 param2 param3] bodyOfAbstraction

Application

(fun arg1 arg2 arg3)

Grouping

{
  (do1)
  (do2)
  (do3)
}

TemList on Stack

[val1 val1 val1]

Simple swap

; [a b] [b a] 

Heap and pointers

  • . nil?
  • : alloc ?
  • , pinter ?
  • ` pointer?

Arrays

String