File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ let add = (number a, number b) => {
4
4
5
5
let sum = add(5, 4)
6
6
7
- println(sum)
8
-
9
7
let iife = ((bool a) => {
10
8
return a
11
9
})(true)
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export class Inferrer {
160
160
// ifstatement.type = get return value type
161
161
break ;
162
162
}
163
- /* case "WhileLoop": {
163
+ case "WhileLoop" : {
164
164
const whileloop = statement as IfStatement ;
165
165
const testType = this . inferType ( whileloop . test ) ;
166
166
@@ -169,17 +169,19 @@ export class Inferrer {
169
169
whileloop
170
170
) ;
171
171
172
- this.scope(whileloop );
172
+ whileloop . body . forEach ( statement => this . inferType ( statement ) ) ;
173
173
break ;
174
174
}
175
175
case "ForEachLoop" : {
176
- this.scope(statement as ForEachLoop);
176
+ const foreachloop = statement as ForEachLoop ;
177
+ foreachloop . body . forEach ( statement => this . inferType ( statement ) ) ;
177
178
break ;
178
179
}
179
180
case "ElseClause" : {
180
- this.scope(statement as ElseClause);
181
+ const elseclause = statement as ElseClause ;
182
+ elseclause . body . forEach ( statement => this . inferType ( statement ) ) ;
181
183
break ;
182
- }*/
184
+ }
183
185
case "FunctionCall" : {
184
186
const functioncall = statement as FunctionCall ;
185
187
Original file line number Diff line number Diff line change 17
17
- ` continue `
18
18
- ` defer `
19
19
- ` assert `
20
+ - Null values
20
21
21
22
### Parser
22
23
- Errors
23
24
- Easier to understand errors
24
25
- Make keywords do something
26
+ - Null values
25
27
26
28
### Inferrer
27
29
- Function call correct parameter detection
30
+ - Null checking & void functions
28
31
29
32
### WASM Generator
30
33
- Add signatures for scoping
31
34
- Unary operations
32
35
- Strings
33
36
- Incremental annonymous ids rather than random
34
- - Variables outside of functions should become global
37
+ - Variables outside of functions should become global
38
+ - Void functions
You can’t perform that action at this time.
0 commit comments