Commit Graph

120 Commits

Author SHA1 Message Date
Ginger Bill
333924cce1 v0.3 Release 2017-06-08 11:35:22 +01:00
Ginger Bill
2c0e59ae06 bit_field; Lexical sugar operators ≠ ≤ ≥
Example below:
// See: https://en.wikipedia.org/wiki/Bit_field
BoxProps :: bit_field {
	opaque        : 1,
	fill_colour   : 3,
	_             : 4,
	show_border   : 1,
	border_colour : 3,
	border_style  : 2,
	_             : 2,
	width         : 4,
	height        : 4,
	_             : 8,
}
2017-06-03 22:27:23 +01:00
Ginger Bill
d3f63e5903 Change label syntax for for and match from #label name to name: 2017-05-28 15:01:39 +01:00
Ginger Bill
45dbe8d354 default: to case:; no_alias to #no_alias 2017-05-27 11:47:21 +01:00
Ginger Bill
41aa4e606b Optional main for DLL; access struct elements by "index" 2017-05-17 21:23:52 +01:00
Ginger Bill
45eecc0905 Reimplement #ordered again 2017-05-12 10:27:14 +01:00
Ginger Bill
c6d531df95 Add %% operator (divisor modulo) 2017-05-09 16:21:31 +01:00
Ginger Bill
7692061eef Add XOR for booleans 2017-05-07 20:52:20 +01:00
Ginger Bill
789b297f32 Add hidden __tag for union variables. 2017-05-04 20:34:50 +01:00
Ginger Bill
cc6282a6e3 Fix alignment and size bug of enums; Remove #ordered and make the default #ordered. 2017-05-02 21:16:09 +01:00
Ginger Bill
dc5587eae2 Fix statement parsing of unary: & and ^ 2017-04-30 17:20:37 +01:00
Ginger Bill
784f3ecf7e Syntax change: cast(T)x => T(x); union_cast(T)x => x.(T); transmute(T)x => transmute(T, x); y:=^x => y:=&x;
Sorry for all the code breaking in this commit :(
2017-04-30 15:09:36 +01:00
Ginger Bill
99125dc743 Fix issue #51; begin work on atomic types 2017-04-28 11:01:46 +01:00
Ginger Bill
b78e970698 Fix issue #48 dependency issue 2017-04-26 23:51:13 +01:00
Ginger Bill
5b8be25938 fmt.String_Buffer, Fix issue #44, Tweak overloading rules 2017-04-26 19:43:17 +01:00
Ginger Bill
a80872b60d Fix checking if a procedure terminates for for loops. 2017-04-25 09:46:30 +01:00
Ginger Bill
822bb51b55 Swap memory layout of any 2017-04-23 18:03:29 +01:00
Ginger Bill
3fd37c6dc5 Internal change: IntervalExpr is now a BinaryExpr 2017-04-22 10:10:49 +01:00
Ginger Bill
9a1566d665 Interval expressions for match statements 2017-04-21 00:13:20 +01:00
Ginger Bill
a713e33007 Change interval syntax: .. open range, ..< half-closed range 2017-04-20 23:22:45 +01:00
Ginger Bill
187b186112 Add #require_results for procedures 2017-04-16 22:30:48 +01:00
Ginger Bill
23a0a6de4b Add parse_int; Fix union bugs with size, alignment, and recursive definition checking 2017-04-14 21:47:59 +01:00
Ginger Bill
d8d22e34dd Fix fmt for type; remove dead stuff 2017-04-13 19:29:17 +01:00
Ginger Bill
3e80411d37 Fix issue #31; Removed down_cast 2017-04-04 21:54:55 +01:00
Ginger Bill
382a5ca6a2 Update and regression test old demos 2017-04-02 22:03:52 +01:00
Ginger Bill
dc303cde21 Complex numbers: complex64 complex128 2017-04-01 12:07:41 +01:00
Ginger Bill
a75ccb6fbc v0.1.3 2017-03-27 20:32:36 +01:00
Ginger Bill
c26990c22d Multiple type cases for match in 2017-03-19 20:55:39 +00:00
Ginger Bill
c34d839f9f Add named branches for match statements 2017-03-19 17:36:08 +00:00
Ginger Bill
5562364a98 Add branch labels for loops; using list 2017-03-19 16:59:11 +00:00
Ginger Bill
32150e401e Update gb.h 2017-03-17 12:30:59 +00:00
Ginger Bill
aaec8bf423 windows.odin TYPE_NAME to Type_Name; More SSA work and SSA printing for debugging 2017-03-12 16:42:51 +00:00
Ginger Bill
f29e303ce7 Slices now have a capacity. 2017-02-26 15:14:08 +00:00
Ginger Bill
3c9143957c Ellipsis is now just ..; Remove half-closed range operator and treat all of them as half-closed; slice expression uses ..; 2017-02-26 14:19:03 +00:00
Ginger Bill
c59f6b7d0b ++ -- statements; add strconv.odin (and replace some of the fmt procs); Fix ~ on 64 bit constants; Fix integer casts from smaller to larger size 2017-02-26 00:44:26 +00:00
Ginger Bill
a982c51c30 Fix minor bugs in IR for slices 2017-02-23 22:22:56 +00:00
Ginger Bill
047c0e4bcc A decent union type with common fields and variants 2017-02-21 21:21:54 +00:00
Ginger Bill
a94dfdf21d Begin changing union syntax 2017-02-19 19:55:19 +00:00
Ginger Bill
9ff474f387 Named return values but do not affect other declarations 2017-02-18 12:02:11 +00:00
Ginger Bill
d2f9d20833 Change ternary expression precedence 2017-02-18 10:41:48 +00:00
Ginger Bill
71100ed427 Ternary expression (removed if and block expression) 2017-02-14 19:26:32 +00:00
Ginger Bill
2722de65b7 Prevent cast on pointer to union types 2017-02-14 17:24:56 +00:00
Ginger Bill
d1f65097c4 Fix immutable rules; add some general documentation
immutable is still a little weird and not completely what you'd expect. Maybe just not having it is better.
2017-02-14 15:19:29 +00:00
Ginger Bill
74d15ab84b Reimplement immutable with different rules. 2017-02-14 12:35:50 +00:00
Ginger Bill
bd27c24fab Use a global to store the build context information 2017-02-12 21:27:13 +00:00
Ginger Bill
e1fdd675ce v0.1.0
Added:
 * Dynamic Arrays `[...]Type`
 * Dynamic Maps   `map[Key]Value`
 * Dynamic array and map literals
 * Custom struct alignemnt `struct #align 8 { bar: i8 }`
 * Allow `_` in numbers
 * Variadic `append`
 * fmt.sprint*
 * Entities prefixes with an underscore do not get exported on imports
 * Overloaded `free` for pointers, slices, strings, dynamic arrays, and dynamic maps
 * enum types have an implict `names` field, a []string of all the names in that enum

Removed:
 * Maybe/option types
 * immutable variables
 * Remove `type` keyword and other "reserved" keywords
 * `compile_assert` and `assert`return the value of the condition for semantic reasons

Changed:
 * thread_local -> #thread_local
 * #include -> #load
 * Files only get checked if they are actually used
 * match x in y {} // For type match statements
 * Version numbering now starts from 0.1.0 and uses the convention:
 	- major.minor.patch

Fixes:
 * Many fmt.* fixes

To come very Soon™:
 * Linux and OS X builds (unofficial ones do exist already)
2017-02-11 21:20:57 +00:00
Ginger Bill
4306345ff1 Dynamic array syntax [...]Type; make entities private with a prefix of _; fix extension checking 2017-02-11 17:33:23 +00:00
Ginger Bill
346aa5f71c Only check files that have been truly imported. 2017-02-11 15:50:24 +00:00
Ginger Bill
73d6a55f5c Remove need for type keyword 2017-02-10 16:12:14 +00:00
Ginger Bill
f18ae89931 Remove Maybe type; Enum names 2017-02-10 14:59:18 +00:00