Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Kelley
d21a1922eb support zig fmt: off and zig fmt: on between top level decls
closes #1030
closes #1033
2018-06-04 12:15:02 -04:00
Andrew Kelley
c029f4bfc4 trailing comma after var args is not supported 2018-05-25 20:41:14 -04:00
Andrew Kelley
08f95d0c2f enum fields with a type are not supported
the c++ codebase lets it slide

the self hosted parser correctly reports a parse error
2018-05-25 01:10:54 -04:00
Andrew Kelley
ca49b6f6b4 struct fields with no explicit type are not supported
the c++ codebase lets it slide

the self hosted parser correctly reports a parse error
2018-05-25 00:39:18 -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
scurest
1a63f27247 allow trailing commas
closes #392
2017-06-17 10:34:51 -04:00