Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 1.45 KB

README.md

File metadata and controls

89 lines (66 loc) · 1.45 KB

Horo Language

✨ An elegant language that compiles into C++ ✨

Synopsis

  • a small language with clear and easy-to-read syntax
  • keep C++ logic and get better coding experience
  • made for C++ algorithm developer

Hello World!

#include <iostream>
using namespace std

int main
	cout << "Hello World!" << endl
	=> 0

How to Install

  1. Prerequisites:

    • g++ 4.8.1 or newer
    • GNU Make 3.82 or newer
  2. Open your terminal and run these commands:

    $ git clone https://github.com/jjwong0915/horo-lang.git
    $ cd horo-lang/compiler
    $ make
    $ sudo make install
  3. Try horo --help if it's successfully then you're done :D

Syntax Guide

  • Functions
int add int a int b
	=> a + b 
bool less int x int y
	=> x < y
  • Variables
int a = 1
double b = 0.5
char c[] = 'INFOR'
  • Loops
for i = 0 to 10
	cout << i << " "
// result: 0 1 2 3 4 5 6 7 8 9
  • Conditions
if a > b
	cout << "a is bigger than b"
else if a == b
	cout << "a is equal to b"
else 
	cout << "a is smaller than b"
  • Structures
struct node
	int data
	node* next

Contributors

License

ISC License