Skip to content

Commit d8af9b9

Browse files
committed
Update documentation, complete rewrite by hand
ANTLR compile times were becoming too slow to be effective, so I rewrote the entire lexer and parser manually and reworked the transpiler. This will be easier to debug and faster in the long run, and translation is almost complete.
1 parent 9fbaad8 commit d8af9b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1206
-413
lines changed

Examples/arithmetic.owpy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Rule "Arithmetic Operations"
55
x *= 3 / 3
66
x = 2 ^ 2
77
x = (3 + 1) % 4
8-
pVar formula = <sin(pVar num_heroes * 360 / count of
9-
allowed heroes
10-
event player /* Call me crazy for supporting inline blocks! */
11-
), cos(pVar num_heroes * 360 / count of(allowed heroes(event player))), 0>
8+
pvar formula = <sin(pvar num_heroes * 360 / Count Of
9+
Allowed Heroes
10+
Event Player /* Call me crazy for supporting inline blocks! */
11+
), cos(pvar num_heroes * 360 / Count Of(Allowed Heroes(Event Player))), 0>

Examples/arrays.ows renamed to Examples/arrays.owpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Rule "Advanced Arrays"
66
y = [1, 2, 3]
77
x[0] = 2
88
x[1] = y[1] + y[2]
9-
x.push(<5, 5, 5>)
10-
x.push(<6, 6, 6>)
9+
x.append(<5, 5, 5>)
10+
x.append(<6, 6, 6>)
File renamed without changes.

Examples/basic.ow

Lines changed: 0 additions & 19 deletions
This file was deleted.

Examples/basic.owpy

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Rule "My First Rule"
2+
Event
3+
On Global
4+
All
5+
All
6+
7+
Conditions
8+
All True
9+
Array: All Players
10+
Team: Team 2
11+
Condition: Has Spawned
12+
Element: Current Array Element
13+
== True
14+
15+
Actions
16+
pvar h@Event Player = 0
17+
h = 1
18+
b = h
19+
c = pvar h

Examples/basic.ows

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Rule "My First Rule"
2-
Event
3-
On Global
4-
All
5-
All
1+
rule("My First Rule")
2+
{
3+
event
4+
{
5+
Ongoing - Each Player
6+
Team 2
7+
All
8+
}
69

7-
Conditions
8-
All True
9-
Array: All Players
10-
Team: Team 2
11-
Condition: Has Spawned
12-
Element: Current Array Element
13-
== True
10+
conditions
11+
{
12+
Is True For All(All Players(Team 2), Has Spawned(Current Array Element)) == True
13+
}
1414

15-
Actions
16-
pVar h@Event Player = 0
17-
h = 1
18-
b = h
19-
c = pVar h
15+
actions
16+
{
17+
Set Global Variable(H, 1)
18+
}
19+
}
File renamed without changes.
File renamed without changes.

Examples/conditionals.ows renamed to Examples/conditionals.owpy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@ Rule "If and Else"
55
x = 1
66
if x == 1:
77
x = 3
8+
y = 4
89
elif x > 1:
9-
x = 2
10+
x = 2
11+
y = 3
12+
y = 4
13+
elif x < 1:
14+
z = 1
File renamed without changes.

0 commit comments

Comments
 (0)