summaryrefslogtreecommitdiff
path: root/code/basic.felan
blob: e69a2195c17f0e1ccbb821891614a89f8fadc561 (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
66
67
68
69
70
71
72
73
74
__plus__ :: (a:u8) -> u8 {
  return a;
};

__plus__ :: (a:i8) -> i8 {
  return a;
};

__plus__ :: (a:u16) -> u16 {
  return a;
};

__plus__ :: (a:i16) -> i16 {
  return a;
};

__plus__ :: (a:u32) -> u32 {
  return a;
};

__plus__ :: (a:i32) -> i32 {
  return a;
};

__plus__ :: (a:u64) -> u64 {
  return a;
};

__plus__ :: (a:i64) -> i64 {
  return a;
};

__minus__ :: (a:i8) -> i8 {
  return @neg(a);
};

__minus__ :: (a:i16) -> i16 {
  return @neg(a);
};

__minus__ :: (a:i32) -> i32 {
  return @neg(a);
};

__minus__ :: (a:i64) -> i64 {
  return @neg(a);
};

__logical_not__ :: (value:bool) -> bool {
  return value == true;
};

__logical_and__ :: (left:bool,right:bool) -> bool {
  if left == true {
    if right == true {
      return true;
    }
  }
  return false;
};

__logical_or__ :: (left:bool,right:bool) -> bool {
  if left == true {
    return true;
  } else if right == true {
    return true;
  } else {
    return false;
  }
};

__equal__ :: (left:bool,right:bool) -> bool {
  return @equal(left,right);
};