aboutsummaryrefslogtreecommitdiff
path: root/src/ast_render.cpp
AgeCommit message (Collapse)Author
2018-06-10breaking syntax change: orelse keyword instead of ?? (#1096)Andrew Kelley
use the `zig-fmt-optional-default` branch to have zig fmt automatically do the changes. closes #1023
2018-06-09breaking syntax change: ??x to x.? (#1095)Andrew Kelley
See #1023 This also renames Nullable/Maybe to Optional
2018-06-04disallow single-item pointer indexingAndrew Kelley
add pointer arithmetic for unknown length pointer
2018-05-31use * for pointer type instead of &Andrew Kelley
See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo'
2018-05-09Merge branch 'master' into pointer-reformAndrew Kelley
2018-05-02Added better support for none pure enums in tranlate CJimmi Holst Christensen
2018-04-30[breaking] delete ptr deref prefix opAndrew Kelley
start using zig-fmt-pointer-reform branch build of zig fmt to fix code to use the new syntax all of test/cases/* are processed, but there are more left to be done - all the std lib used by the behavior tests
2018-04-30support foo.* for ptr derefAndrew Kelley
See #770
2018-04-08*WIP* async/await TCP serverAndrew Kelley
2018-03-24add promise->T syntax parsingAndrew Kelley
closes #857
2018-03-24fix async fns with inferred error setsAndrew Kelley
closes #856
2018-03-07Ast Render no longer outputs erroneous semicolonJimmi Holst Christensen
closes #813
2018-03-06var is no longer a pseudo-type, it is syntaxAndrew Kelley
closes #779
2018-02-28implement coroutine resumeAndrew Kelley
2018-02-26parse await and suspend syntaxAndrew Kelley
See #727
2018-02-20parse async fn calls and cancel expressionsAndrew Kelley
2018-02-02*WIP* error sets - correctly resolve inferred error setsAndrew Kelley
2018-01-31*WIP* error setsAndrew Kelley
2018-01-25syntax: functions require return type. remove `->`Andrew Kelley
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-23cleanups that I meant to put in the previous commitAndrew Kelley
2018-01-09remove %% prefix operatorAndrew Kelley
See #632 closes #545 closes #510 this makes #651 higher priority
2018-01-07replace `a %% b` with `a catch b`Andrew Kelley
See #632 better fits the convention of using keywords for control flow
2018-01-07replace `%return` with `try`Andrew Kelley
See #632 better fits the convention of using keywords for control flow
2017-12-22explicitly return from blocksAndrew Kelley
instead of last statement being expression value closes #629
2017-12-20add labeled loops, labeled break, labeled continue. remove gotoAndrew Kelley
closes #346 closes #630 regression: translate-c can no longer translate switch statements. after #629 we can ressurect and modify the code to utilize arbitrarily returning from blocks.
2017-12-19bring back code that uses export and fix testsAndrew Kelley
partial revert of 1fdebc1dc4881a00766f7c2b4b2d8ee6ad6e79b6
2017-12-18wip export rewriteAndrew Kelley
2017-12-07translate-c: support macros with pointer castingAndrew Kelley
2017-12-03rework enums and unions and their relationship to each otherAndrew Kelley
* @enumTagName renamed to @tagName and it works on enums and union-enums * Remove the EnumTag type. Now there is only enum and union, and the tag type of a union is always an enum. * unions support specifying the tag enum type, and they support inferring an enum tag type. * Enums no longer support field types but they do support setting the tag values. Likewise union-enums when inferring an enum tag type support setting the tag values. * It is now an error for enums and unions to have 0 fields. * switch statements support union-enums closes #618
2017-12-02ability to set tag values of enumsAndrew Kelley
also remove support for enums with 0 values closes #305
2017-11-30ability to specify tag type of enumsAndrew Kelley
see #305
2017-11-14c-to-zig: handle UO_DerefAndrew Kelley
2017-09-21parse-c: field access expressionsAndrew Kelley
2017-09-20logical and, logical orJosh Wolfe
2017-09-05fix parseh bugsAndrew Kelley
2017-09-02rewrite parseh to use AST instead of direct typesAndrew Kelley
some tests still failing
2017-08-30align syntax: align(4) instead of align 4Andrew Kelley
closes #37
2017-08-29more alignment improvementsAndrew Kelley
* add alignment capability for fn protos * add @alignCast * fix some ast rendering code * fix some ir rendering code * add error for pointer cast increasing alignment * update allocators in std to correctly align See #37
2017-08-29introduce align keywordAndrew Kelley
* remove `@setGlobalAlign` * add align keyword for setting alignment on functions and variables. * loads and stores use alignment from pointer * memcpy, memset use alignment from pointer * add syntax for pointer alignment * slices can have volatile * add u2, i2 primitives * ignore preferred align and use abi align everywhere * back to only having alignOf builtin. preferredAlignOf is too tricky to be useful. See #432. Partial revert of e726925e802eddab53cbfd9aacbc5eefe95c356f. See #37
2017-08-20compile-time f32, f64 operations are now correctly lossyAndrew Kelley
previously we used the bigfloat abstraction to do all compile-time float math. but runtime code and comptime code are supposed to get the same result. so now if you add a f32 to a f32 at compile time it does it with f32 math instead of the bigfloat. float literals still get the bigfloat math. closes #424
2017-08-09more intuitive left shift and right shift operatorsAndrew Kelley
Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413
2017-07-08better bigint/bigfloat implementationAndrew Kelley
2017-06-14progress toward windows hello world workingAndrew Kelley
2017-05-23building with mingw for windowsAndrew Kelley
2017-05-09inline function call with builtin function instead...Andrew Kelley
...of special syntax. partially reverts 41144a8566a6fbd779403f6b69424bb640c94a7f closes #306
2017-05-04implement else on loops and break can give an expressionAndrew Kelley
closes #357
2017-05-04implement while for nullables and error unionsAndrew Kelley
See #357
2017-05-03remove test and try expressions in favor of if expressionsAndrew Kelley
See #357
2017-04-23make undefined as a constant value lazyAndrew Kelley
closes #268
2017-04-22slicing now returns correct const-nessAndrew Kelley
also remove the ability to override constness when slicing closes #334