Skip to content

Commit d493892

Browse files
committed
modules: some more WIP, native modules do work now arrrr, misses some minor stuff still/11
1 parent c3b2cf2 commit d493892

18 files changed

+472
-265
lines changed

README-ToDo.md

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

documentation/README-BuiltIn-Functions.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -375,24 +375,22 @@
375375
# 2. Links
376376

377377
## 2.1. Language Documentation
378-
- [Syntax](./README-Syntax.md)
379-
- [Data types](./README-DataTypes.md)
380-
- [Flow control - if, elseif, else](./README-FlowControl-Conditions.md)
381-
- [Flow Control - switch, case, default](./README-FlowControl-Conditions2.md)
382-
- [Flow Control - loops](./README-FlowControl-Loops.md)
383-
- [Classes](./README-Classes.md)
384-
- [Classes API](./README-Classes-API.md)
385-
- [Functions](./README-Functions.md)
386-
- [BuiltIn functions](./README-BuiltIn-Functions.md)
387-
- [Functions](./README-Functions.md)
388-
- [Operators](./README-Operators.md)
389-
- [Syntax](./README-Events.md)
390-
- [Events](./README-Constants.md)
378+
- [Syntax](./documentation/README-Syntax.md)
379+
- [DataTypes](./documentation/README-DataTypes.md)
380+
- [Flow control - if, elseif, else](./documentation/README-FlowControl-Conditions.md)
381+
- [Flow Control - switch, case, default](./documentation/README-FlowControl-Conditions2.md)
382+
- [Flow Control - loops](./documentation/README-FlowControl-Loops.md)
383+
- [Classes](./documentation/README-Classes.md)
384+
- [Classes API](./documentation/README-Classes-API.md)
385+
- [Functions](./documentation/README-Functions.md)
386+
- [BuiltIn functions](./documentation/README-BuiltIn-Functions.md)
387+
- [Modules](./documentation/README-Modules.md)
388+
- [Operators](./documentation/README-Operators.md)
389+
- [Constants](./documentation/README-Constants.md)
391390

392391
## 2.2. Other Links
393392

394393
- MinitScript, see [README.md](./README.md)
395394
- MinitScript - How to build, see [README-BuildingHowTo.md](./README-BuildingHowTo.md)
396395
- MinitScript - How to use, see [README-Tools.md](./README-Tools.md)
397-
- MinitScript - ToDo list, see [README-ToDo.md](./README-ToDo.md)
398396
- The Mindty Kollektiv [Discord Server](https://discord.gg/Na4ACaFD)

documentation/README-Classes-API.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -293,24 +293,22 @@
293293
# 2. Links
294294

295295
## 2.1. Language Documentation
296-
- [Syntax](./README-Syntax.md)
297-
- [Data types](./README-DataTypes.md)
298-
- [Flow control - if, elseif, else](./README-FlowControl-Conditions.md)
299-
- [Flow Control - switch, case, default](./README-FlowControl-Conditions2.md)
300-
- [Flow Control - loops](./README-FlowControl-Loops.md)
301-
- [Classes](./README-Classes.md)
302-
- [Classes API](./README-Classes-API.md)
303-
- [Functions](./README-Functions.md)
304-
- [BuiltIn functions](./README-BuiltIn-Functions.md)
305-
- [Functions](./README-Functions.md)
306-
- [Operators](./README-Operators.md)
307-
- [Syntax](./README-Events.md)
308-
- [Events](./README-Constants.md)
296+
- [Syntax](./documentation/README-Syntax.md)
297+
- [DataTypes](./documentation/README-DataTypes.md)
298+
- [Flow control - if, elseif, else](./documentation/README-FlowControl-Conditions.md)
299+
- [Flow Control - switch, case, default](./documentation/README-FlowControl-Conditions2.md)
300+
- [Flow Control - loops](./documentation/README-FlowControl-Loops.md)
301+
- [Classes](./documentation/README-Classes.md)
302+
- [Classes API](./documentation/README-Classes-API.md)
303+
- [Functions](./documentation/README-Functions.md)
304+
- [BuiltIn functions](./documentation/README-BuiltIn-Functions.md)
305+
- [Modules](./documentation/README-Modules.md)
306+
- [Operators](./documentation/README-Operators.md)
307+
- [Constants](./documentation/README-Constants.md)
309308

310309
## 2.2. Other Links
311310

312311
- MinitScript, see [README.md](./README.md)
313312
- MinitScript - How to build, see [README-BuildingHowTo.md](./README-BuildingHowTo.md)
314313
- MinitScript - How to use, see [README-Tools.md](./README-Tools.md)
315-
- MinitScript - ToDo list, see [README-ToDo.md](./README-ToDo.md)
316314
- The Mindty Kollektiv [Discord Server](https://discord.gg/Na4ACaFD)

documentation/README-Classes.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22

33
# 1. Classes
44

5-
Classes in MinitScript can be represented by maps, a constructed map with function assignments and/or definitions can be called object, see map section in 4.4.
5+
Classes in MinitScript can be represented by maps.
6+
A constructed map with function assignments and/or definitions can be called object, see map section in 4.4.
67

78
Creating a object in MinitScript works by using map initializer plus () -> methodName function assignment, or () -> { console.dump($this) } inline function definition.
8-
Please see a example below.
9+
Please see the example below, which shows a object definition, which includes (private) member variables and member methods.
10+
11+
Note that you can set member variables and member methods to private, if they are prefixed with a "-".
12+
913

1014
```
1115
...
1216
#
1317
$car = {
1418
# member variables
15-
wheelCount: 4,
16-
color: "blue",
17-
horsePower: 75,
19+
-wheelCount: 4,
20+
-color: "blue",
21+
-horsePower: 75,
1822
# member methods
1923
setWheelCount: ($wheelCount) ->
2024
{
@@ -45,6 +49,10 @@ Please see a example below.
4549
$wheelCount = $this.wheelCount
4650
$color = $this.color
4751
$horsePower = $this.horsePower
52+
},
53+
-somePrivateFunction: () ->
54+
{
55+
console.printLine("This just shows a private member function")
4856
}
4957
}
5058
#
@@ -115,29 +123,25 @@ end
115123
#...
116124
```
117125

118-
TODO: private properties, && argument prefix
119-
120126
# 2. Links
121127

122128
## 2.1. Language Documentation
123-
- [Syntax](./README-Syntax.md)
124-
- [Data types](./README-DataTypes.md)
125-
- [Flow control - if, elseif, else](./README-FlowControl-Conditions.md)
126-
- [Flow Control - switch, case, default](./README-FlowControl-Conditions2.md)
127-
- [Flow Control - loops](./README-FlowControl-Loops.md)
128-
- [Classes](./README-Classes.md)
129-
- [Classes API](./README-Classes-API.md)
130-
- [Functions](./README-Functions.md)
131-
- [BuiltIn functions](./README-BuiltIn-Functions.md)
132-
- [Functions](./README-Functions.md)
133-
- [Operators](./README-Operators.md)
134-
- [Syntax](./README-Events.md)
135-
- [Events](./README-Constants.md)
129+
- [Syntax](./documentation/README-Syntax.md)
130+
- [DataTypes](./documentation/README-DataTypes.md)
131+
- [Flow control - if, elseif, else](./documentation/README-FlowControl-Conditions.md)
132+
- [Flow Control - switch, case, default](./documentation/README-FlowControl-Conditions2.md)
133+
- [Flow Control - loops](./documentation/README-FlowControl-Loops.md)
134+
- [Classes](./documentation/README-Classes.md)
135+
- [Classes API](./documentation/README-Classes-API.md)
136+
- [Functions](./documentation/README-Functions.md)
137+
- [BuiltIn functions](./documentation/README-BuiltIn-Functions.md)
138+
- [Modules](./documentation/README-Modules.md)
139+
- [Operators](./documentation/README-Operators.md)
140+
- [Constants](./documentation/README-Constants.md)
136141

137142
## 2.2. Other Links
138143

139144
- MinitScript, see [README.md](./README.md)
140145
- MinitScript - How to build, see [README-BuildingHowTo.md](./README-BuildingHowTo.md)
141146
- MinitScript - How to use, see [README-Tools.md](./README-Tools.md)
142-
- MinitScript - ToDo list, see [README-ToDo.md](./README-ToDo.md)
143147
- The Mindty Kollektiv [Discord Server](https://discord.gg/Na4ACaFD)

0 commit comments

Comments
 (0)