gingerBill
e956f7a99c
Begin to see where the performance issues are in the parser
2026-06-09 15:10:48 +01:00
gingerBill
e2efc29373
Minimize memory usage in parser by only caching tokens when doing strip-semicolon
2026-06-09 15:01:22 +01:00
gingerBill
1c9fa5d0b7
Merge pull request #6731 from odin-lang/bill/expand-values-operator
...
Support `**` as `expand_values` operator: `**x` == `expand_values(x)`
2026-06-05 11:42:08 +01:00
gingerBill
7a5a73efae
Generalize is_foreign_name_valid but add TODO to see how it should work.
2026-06-02 13:21:57 +01:00
gingerBill
b914dc1f32
Change compound literal grammar to match the formal grammar
2026-06-02 11:10:58 +01:00
gingerBill
fb8a9d0839
Support ** as expand_values operator: **x == expand_values(x)
2026-05-25 10:28:15 +01:00
Krzesimir Nowak
b924da10a0
Be more thorough in detecting generic procedure types
2026-05-20 22:11:25 +02:00
Krzesimir Nowak
34b198019f
Better error reporting for unary decrement/increment operators
...
There was a missing routing for those operators in parse_stmt
function.
2026-05-05 15:16:49 +02:00
gingerBill
4dceffd049
When parsing an incorrect for loop, remove assert
...
// caused by this:
```
for a
b, c := d()
```
2026-03-30 11:50:59 +01:00
gingerBill
d5a78a9cf1
Remove canonical hash shortcut
2026-03-17 09:43:16 +00:00
gingerBill
a8c6ea7c8a
Implement a new StringInterner
2026-03-17 09:18:39 +00:00
gingerBill
1744f57d01
Use permanent_alloc_item directly rather than through the gb_alloc_item generic interface
2026-03-16 16:03:27 +00:00
gingerBill
f1dbe9c242
[dynamic; N]T proof of concept: fixed capacity dynamic array (akin to small_array.Small_Array(N, T))
2026-03-11 16:46:33 +00:00
Jeroen van Rijn
6434bf4b65
Limit maximum exponent in parsing of float/integer literals
2026-03-07 12:38:04 +01:00
Krzesimir Nowak
1f00da471c
Make sure to assign proper comment as package docs
...
So far, the first comment found was marked as package docs, which
meant that for the following code, the TODO comment would be assigned
to the package declaration instead of the comment directly preceding
the package declaration.
// TODO: drop after finished with refactoring
#+ feature using-stmt
// Package foo implements this and that.
package foo
2026-03-02 21:26:04 +01:00
Krzesimir Nowak
b8f2daa5b2
Kill deprecated file tags
...
We had the recommended form of file tags for long enough. Also there
were some issues with the deprecated file tags - they were ignored if
the appeared after recommended file tags, and could possibly show up
in package docs.
2026-03-02 21:26:04 +01:00
Krzesimir Nowak
4ab536a85a
Drop pointless code
...
Modifies a local variable after it was stored in an out parameter, so
this modification has no effect.
2026-03-02 21:24:59 +01:00
Krzesimir Nowak
8bdf82ac8d
Fix separating of diverging procedure types from block statements
...
To avoid creating a procedure literal from a procedure type and a
following block statement, one can insert a semicolon or an empty line
between the two:
// procedure literals
p1 :: proc() {…}
p2 :: proc()
{…}
// procedure type followed by a block statement
p3 :: proc()
{…}
The empty line as a separator did not work if the procedure type had a
diverging result:
// all of these are procedure literals
p4 :: proc() -> ! {…}
p5 :: proc() -> !
{…}
p6 :: proc() -> !
{…}
The least annoying fix I came up with is to insert implicit semicolon
after the "not" token. I only needed to make sure that the inserted
implicit semicolon is being skipped when the "not" token is a part of
unary expression to avoid breaking an oddly-formatted code like:
b := get_some_bool()
if !
b {…}
One small side-effect of this change is that in code like below:
Proc_Type :: proc() -> !
// Some comment
Some_Other_Type :: enum byte {…}
The "// Some comment" is not associated with "Proc_Type" anymore. In
Odin's standard library this only happens in one place, in
`base/runtime/core.odin`:
Assertion_Failure_Proc :: #type proc(prefix, message: string, loc: Source_Code_Location) -> !
// Allocation Stuff
Allocator_Mode :: enum byte {
Alloc,
…,
}
2026-03-01 14:49:24 +01:00
gingerBill
a7ed7ccd0c
Merge pull request #6259 from odin-lang/bill/range-init
...
`for init; x in y {}` style loops (proof of concept)
2026-02-17 11:11:56 +00:00
Krzesimir Nowak
a84179de1f
Do not allow duplicate #partial directives on switch statement
2026-02-15 16:37:14 +01:00
gingerBill
8cb7965aa5
for init; x in y {} style loops
2026-02-11 15:33:14 +00:00
gingerBill
b1633b9ebb
Require all values from a procedure iterator if the procedure is marked with @(require_results)
2026-02-11 14:05:06 +00:00
Krzesimir Nowak
6cc6f06d4d
Stop silently ignoring unknown directives on an inline asm expression
2026-02-11 13:22:13 +01:00
gingerBill
19b545e7cb
Merge branch 'master' into bill/feature-using-stmt
2026-01-30 10:49:55 +00:00
Faker-09
30ef01ee8d
Merge branch 'odin-lang:master' into vet_flags
2026-01-29 11:35:24 -05:00
gingerBill
07d814d9cf
Add struct #simple to force a struct to use simple comparison if all of the fields "nearly simply comparable".
2026-01-29 10:49:26 +00:00
Shane Shrybman
f6322b4b31
Fix for vet flags. All combinations of vet flags on the command line and top of file are working
2026-01-28 14:18:30 -05:00
gingerBill
83a10e929f
Require space after the prefix of #+build style tags
2026-01-26 10:49:24 +00:00
gingerBill
cc4a7ec11c
Merge pull request #6166 from laytan/vet-file-tags-in-addition-to-command-line
...
make #+vet tags always work in addition to command line flags
2026-01-24 13:55:41 +00:00
Jeroen van Rijn
1c529d8cb2
Fix #6165
2026-01-24 14:06:31 +01:00
Laytan Laats
a9a65b5377
make #+vet tags always work in addition to command line flags
2026-01-24 12:59:55 +01:00
Jeroen van Rijn
ce71227b6b
Fix #6130
2026-01-22 15:20:39 +01:00
gingerBill
59ae82634e
Add preserve/most and preserve/all
2026-01-15 17:52:36 +00:00
gingerBill
5f07055ac1
Add #must_tail and "preserve/none" calling convention
2026-01-15 17:28:28 +00:00
gingerBill
0366cd3304
Add #must_tail (similar syntax to #force_inline
2026-01-15 16:32:52 +00:00
Krzesimir Nowak
0bf4ffe469
Fix handling of #force_inline
2025-12-29 22:08:56 +01:00
gingerBill
2e6554b8c8
Disallow importing directories with an .odin extension/suffix
2025-12-26 11:49:46 +00:00
gingerBill
d139c72fc2
Make using as a statement an opt-in with #+feature using-stmt
2025-12-21 11:53:44 +00:00
Krzesimir Nowak
a5809d0185
Fix #packed #all_or_none
2025-12-18 15:04:34 +01:00
gingerBill
fc2cb8fb39
Remove #no_copy
2025-11-05 13:44:14 +00:00
gingerBill
593d2e6daa
Add #all_or_none
2025-11-05 13:30:40 +00:00
gingerBill
0972690e14
Add suggestion for T[] to be []T if a type is allowed in that parsing context
2025-10-30 09:16:19 +00:00
gingerBill
025cb03242
Add all-bits to feature tag
2025-10-09 15:02:16 +01:00
gingerBill
547477abf6
Add #+test to replace _test.odin
2025-09-28 20:47:32 +01:00
gingerBill
5ea2e1fe60
Minimize mutex usage when in single threaded mode.
2025-09-10 21:41:52 +01:00
gingerBill
34e3d30780
More thread contention removal
2025-09-10 20:51:52 +01:00
gingerBill
7b5cee9f1e
Correct #+feature check
2025-08-08 10:50:24 +01:00
gingerBill
ee01643229
Add -integer-division-by-zero:self
2025-08-08 10:41:05 +01:00
gingerBill
991883d0e1
Add #+feature integer-division-by-zero:<string>
2025-08-08 10:24:44 +01:00
gingerBill
513e6daace
Merge pull request #5081 from Lperlind/vet-explicit-allocators
...
Add -vet-explicit-allocators
2025-07-22 11:06:12 +01:00