Skip to content

jjwong0915/horo-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An elegant language that compiles into C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published