aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 89e4de083f9b977f84ac7d26480dda837b0178cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Felan
A strongly statically typed programming language with a simple and friendly syntax. The language has been influenced by many other languages to be more user friendly both for new programmers who don't have many years of programming with other languages and those who want a powerful tool for programming.

# Features
* Powerful type system
* Compile time execution
* Operator overloading
* Function overloading
* Generic programming
* Meta programming
* Low level access
* Pointer
* ...

# Requirement
* Linux or *nix like OS
* git
* gnu make
* gcc (you can use clang or tcc but you have to change make for it)
* libffi (for calling C functions)

# How to use ?
Clone the repo
```
git clone https://github.com/A404M/felan
cd felan
```
Building
```
make
```
Run ./build/felan with any file which you want to run
```
./build/felan code/main.felan
```

# Examples
## Hello world
```
@import("basic.felan");

main :: () -> void {
  print("Hello, world!");
};
```
## Printing
```
@import("basic.felan");

main :: () -> void {
  b := 1234;
  print(b);
  a : i8 = 32;
  print(a);
  print("This is a string");
};
```

# TODO
* ~Overloading [] operator~
* ~Add code injection~
* Add macro
* Add enum
* Compile AST to BBA
* Compile BBA to ASM