Commit Graph

11 Commits (137c8f5e8a6023db24f90555e968b592a4b843e4)

Author SHA1 Message Date
Andrew Kelley 2dfb1ebee2 const global values can reference each other
Before, if you did something like:

```
const hi1 = "hi";
const hi2 = hi1;
```

This would create the "hi" data twice in the built object.
But since the value is const we don't have to duplicate the
data, now we take advantage of this fact.

closes #336
2017-05-27 00:54:14 -04:00
Andrew Kelley c42c91ee7c fix segfault with array of generic functions
closes #377
2017-05-26 14:39:18 -04:00
Andrew Kelley 68add5d828 clean up behavior test names 2017-05-23 21:38:31 -04:00
Andrew Kelley 698829b772 change while syntax
Old:

```
while (condition; expression) {}
```

New:

```
while (condition) : (expression) {}
```

This is in preparation to allow nullable and
error union types as the condition. See #357
2017-05-03 18:12:07 -04:00
Andrew Kelley ffb4852012 add compile error for the bug of unable to call var ags at compile time
See #313
2017-04-07 00:33:19 -04:00
Andrew Kelley a3de550d3b fix var args having wrong index when runtime param before it
closes #312
2017-04-06 21:00:49 -04:00
Andrew Kelley af536ac343 introduce new test syntax
* remove setFnTest builtin
 * add test "name" { ... } syntax
 * remove --check-unused argument. functions are always lazy now.
2017-03-16 16:02:35 -04:00
Andrew Kelley c62db5721c support passing var args directly
See #77
2017-03-09 16:13:38 -05:00
Andrew Kelley 88a253c64d fix crash when passing void to var args function
closes #235
2017-01-31 15:50:38 -05:00
Andrew Kelley 32d8686da8 various fixes
* comptime expression is a block expression as it should be
 * fix var args when number of args passed is 0
 * implement const value equality for structs
 * fix indent when rendering container decl AST
 * IR: prevent duplicate generation of code when it is partially
   compile-time evaluated
 * implement compile time struct field pointer evaluation
 * fix compile time evaluation of slicing
2017-01-23 23:30:20 -05:00
Andrew Kelley 17cb85dfb8 basic support for functions with variable length arguments
See #77
2017-01-23 16:40:17 -05:00