-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHyper Example Language Language
More file actions
70 lines (64 loc) · 1.25 KB
/
Hyper Example Language Language
File metadata and controls
70 lines (64 loc) · 1.25 KB
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
Language name: Hyper Example Language Language (Hell)
Memory management: TGC (Garbage Collection)
Data Types:
- Bool/Boolean
- Number(s)
- Strings
- Tables/Dictionaries
- Classes, teehee (maybe lol)
Expressions:
Arithmetic:
- addition
- subtraction (doubles as negate)
- mutiplication
- division
- modulous
- exponents
- log
comparison:
- less than
- less than equal to
- greater than
- greater than equal to
- equal (false if not true)
- not equal (false if not true)
logic ops:
- negate
- and
- or
precedence:
- mostly norm stuffs
- bypass with paren(s)
Statements:
- make blocks/scopes with curlies
Variables:
- use var
- global
- local
- can be nil
Control Flow:
- if statements
- else if
- else
- while
- for
Functions:
- use function
- enclosed with curlies
- ret for return
- paren to accept args
- ret nil by default
- first class (fancy talk for, they act as standard values)
- nestables
- allow anonymous
- can be global or local
Classes:
- use class
- enclosed with curlies
- have private and public data/methods
- first class
- self to access their own data
- inherit with <
the standard library:
get good, i only like print. . .
(nah ill do more if i get there, but it'll take a while)