Biro

🇵🇭 A Bisaya-flavored language transpiled to C. Biro means joke in Bisaya.

Purpose

Learned about Crafting Interpreters and thought I’d create this as a joke to show my friends.

Example

// Biro-lang

// Hello, World! example
Mawadwad_sa "Hello, World!";

// Variables (strings and numbers for now)
var gikan = 5;
var pangalanan = "Juan";

// Control structures
Kon (barya > 10) {
  Ihap_sa "Dako ang barya!";
} Kun_dili {
  Ihap_sa "Gamay lang ang barya.";
}

// Loops
Para (var i = 0; i < 5; i = i + 1) {
  Ihap_sa "Kumusta ka, Bisaya?";
}

// Functions
Funksyon kuhaAngKwarta(barya) {
  Balik barya * 2;
}

// Classes and inheritance
Klase Mananap {
  sulti() {}

  lupad() {
    Ihap_sa "Dili ko makalupad";
  }
}

Klase Iro < Mananap {
  sulti() {
    Ihap_sa "woof";
  }
}