Commit Graph

5 Commits (0fa24b6b7568557c29c9b3ee213ce2b06fcd6367)

Author SHA1 Message Date
Andrew Kelley 363f4facea self-hosted: generate LLVM IR for simple function 2018-07-15 00:07:33 -04:00
Andrew Kelley 278829fc2c self-hosted: adding a fn to an llvm module 2018-07-14 16:03:22 -04:00
Andrew Kelley ec1b6f6673
breaking syntax change: ??x to x.? (#1095)
See #1023

This also renames Nullable/Maybe to Optional
2018-06-09 23:42:14 -04:00
Andrew Kelley 3671582c15 syntax: functions require return type. remove `->`
The purpose of this is:

 * Only one way to do things
 * Changing a function with void return type to return a possible
   error becomes a 1 character change, subtly encouraging
   people to use errors.

See #632

Here are some imperfect sed commands for performing this update:

remove arrow:

```
sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig")
```

add void:

```
sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig")
```

Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-25 04:10:11 -05:00
Andrew Kelley 39c7bd24e4 port most of main.cpp to self hosted compiler 2017-12-23 00:57:56 -05:00