Andrew Kelley
051ee8e626
change slicing syntax from ... to ..
...
See #359
2017-05-19 10:39:59 -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
72fb2443e0
API for command line args
...
closes #300
2017-04-04 00:17:24 -04:00
Andrew Kelley
0ac1934ad6
fix examples
2017-02-26 14:35:30 -05:00
Andrew Kelley
34a4d7a201
update cat example code
2017-01-24 02:06:56 -05:00
Andrew Kelley
4b3f18de3c
printf var args proof of concept
...
See #167
Need to troubleshoot when we send 2 slices to printf. It goes
into an infinite loop.
This commit introduces 4 builtin functions:
* `@isInteger`
* `@isFloat`
* `@canImplictCast`
* `@typeName`
2017-01-24 02:02:48 -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
e621ad014e
pass cannot assign to constant test
2017-01-05 18:50:36 -05:00
Andrew Kelley
cfaced3f73
rename errName builtin to errorName
2016-09-05 17:03:11 -04:00
Andrew Kelley
ed50bd1b65
progress toward stack trace printing
2016-08-17 20:11:04 -07:00
Andrew Kelley
37d167f6e0
std: conform to style guidelines
2016-08-16 22:42:50 -07:00
Andrew Kelley
4961910e7f
cat example: fix not flushing stderr
2016-04-24 11:23:46 -07:00
Andrew Kelley
f4c7e1bf49
rearrange standard library a bit
2016-04-18 16:42:56 -07:00
Andrew Kelley
fdf6a18461
fix cat example by flushing stdout at end
2016-04-09 14:40:09 -07:00
Andrew Kelley
5dbc21b511
update cat example, refactor std
...
partial implementation of @err_name
2016-04-08 16:21:30 -07:00
Andrew Kelley
d8f6388b63
if statements can be const expr evaluated
...
also introduce error for unnecessary if statement
but if the condition depends on a compile variable, then
the if statement is OK
2016-02-09 18:53:28 -07:00
Andrew Kelley
ec33e5a638
simple unconditional defer support
...
See #110
2016-02-06 01:00:29 -07:00
Andrew Kelley
4e43973413
variable initializations are now mandatory
...
use `undefined` if you want uninitialized memory
2016-01-25 23:56:46 -07:00
Andrew Kelley
1d68150242
compiler enforces checking for error
...
See #23
2016-01-25 20:27:57 -07:00
Andrew Kelley
deb3586884
implement %% prefix operator
...
See #23
also make undefined constants use llvm undef value
2016-01-25 15:45:05 -07:00
Andrew Kelley
6db6609df8
implement %% operator
...
See #23
2016-01-25 13:53:40 -07:00
Andrew Kelley
5c18826240
introduce the error keyword and type
...
See #23
2016-01-24 01:34:57 -07:00
Andrew Kelley
37aae53009
various small cleanups
2016-01-23 03:06:29 -07:00
Andrew Kelley
c0ea9290c4
main returns %void
2016-01-23 02:14:01 -07:00
Andrew Kelley
5e212db29c
parsing error value decls and error value literals
...
and return with '?' or '%' prefix
2016-01-20 18:18:50 -07:00
Andrew Kelley
92dccde2fd
revise plan for cat example
2016-01-18 19:32:27 -07:00
Andrew Kelley
826c7f06a3
fix cat example
2016-01-16 03:31:43 -07:00
Andrew Kelley
9e74b7e754
proposed cat example implementation
2016-01-16 03:10:15 -07:00
Andrew Kelley
5f7685336f
better main symbol prototype
...
closes #64
2016-01-16 00:07:34 -07:00
Andrew Kelley
b28b7f63d1
all types are now expressions
...
See #22
2016-01-13 18:15:51 -07:00