Commit Graph

14331 Commits

Author SHA1 Message Date
Feoramund 76575e834b Raise error on spaced UNIX-style flag with no value 2024-06-15 00:24:59 -04:00
Feoramund 42a5a2cf17 Fix memory leak in core:flags validation 2024-06-15 00:01:33 -04:00
Feoramund c3acdeb310 Add -- parsing to UNIX-style core:flags
This will allow a user to indicate all arguments after `--` are parsed
into the variadic array.
2024-06-14 23:59:01 -04:00
Feoramund d4e2fa0377 Refactor show_error_on_line
This should adequately solve any issues with Unicode alignment by
sidestepping the issue entirely. With this change, we make use of the
built-in ANSI facilities of the terminal to underline the text.

If the terminal does not support underlining, there are still the
fallback bold markers at the start and end of error locations.
2024-06-14 18:28:47 -04:00
Feoramund 582154f20d Remove unused code from tokenizer 2024-06-14 15:44:50 -04:00
Jeroen van Rijn 908a6ff2d4 Elide unnecessary condition 2024-06-14 21:34:05 +02:00
Jeroen van Rijn 09b3f5a7a7 Merge pull request #3757 from thetarnav/patch-2
Add `#no_bounds_check` to `slice.equal`
2024-06-14 21:27:21 +02:00
Jeroen van Rijn fa4fbbe1ce Merge pull request #3758 from jones-josh/master
Fix big.shrink not actually shrinking
2024-06-14 20:27:03 +02:00
Josh Jones 759139089f Fix big.shrink not actually shrinking 2024-06-14 19:58:13 +02:00
Damian Tarnawski 8ba644dd79 Add #no_bounds_check to slice.equal 2024-06-14 19:45:54 +02:00
Feoramund 8626d38db1 Fix displaying emptiness when error is on first line 2024-06-14 13:02:54 -04:00
Jeroen van Rijn b19bf5bbda Merge pull request #3732 from FrancisTheCat/master
add missing functions to core:sys/windows
2024-06-14 17:57:23 +02:00
Feoramund ca481dc52d Fix displaying error on wrong line with token at EOL
Previously, this would get a token on text like "\n*\n" where `*`
is the token's position, and it would advance off that line.
2024-06-14 11:51:03 -04:00
Franz Höltermann c3302615a3 Merge branch 'master' of https://github.com/FrancisTheCat/Odin 2024-06-14 17:43:09 +02:00
Franz Höltermann 3c3f0f90c2 Fixed WinEventFlags 2024-06-14 17:41:21 +02:00
FrancisTheCat cd5fa8523f Merge branch 'odin-lang:master' into master 2024-06-14 16:34:21 +02:00
Franz Höltermann ec7b77fc0f Improved win32 bindings according to Kelimions suggestions with enums and bitsets 2024-06-14 16:32:41 +02:00
Matias Fernandez 4baf101f15 Handle empty structs in fmt with hash 2024-06-14 05:36:23 -04:00
Jeroen van Rijn ff4787070d Revert "Merge pull request #3744 from Mango0x45/master"
This reverts commit 45044de0b7, reversing
changes made to 20c17ba6f9.
2024-06-14 00:06:55 +02:00
Jeroen van Rijn 54a3cfb540 Merge pull request #3753 from Feoramund/fix-silent-token-fail
Fix compiler silently returning if `parse_packages` fails
2024-06-13 19:33:02 +02:00
Feoramund c560553c21 Fix compiler silently returning if parse_packages fails 2024-06-13 13:01:51 -04:00
Thomas la Cour acce9acb6d Merge remote-tracking branch 'upstream/master' into sys-windows-2 2024-06-13 18:31:53 +02:00
Jeroen van Rijn 45044de0b7 Merge pull request #3744 from Mango0x45/master
Pad ‘^~~~^’-style diagnostic ranges properly
2024-06-13 17:34:17 +02:00
Jeroen van Rijn c9c7d3270d Merge branch 'master' of https://github.com/Mango0x45/Odin into pr/3744 2024-06-13 17:27:00 +02:00
Thomas Voss 9f7ac1469f Generate ranges of the correct length 2024-06-13 17:24:56 +02:00
Jeroen van Rijn ca9d1f940d Just change squiggle_extra type to i32. 2024-06-13 17:23:30 +02:00
Thomas Voss 9f190f3937 Generate ranges of the correct length 2024-06-13 17:00:13 +02:00
Thomas Voss 657c516360 Pad ‘^~~~^’-style diagnostic ranges properly 2024-06-13 16:23:34 +02:00
Jeroen van Rijn 20c17ba6f9 Merge pull request #3751 from Kelimion/custom_formatter
Add example of a custom formatter.
2024-06-13 11:42:38 +02:00
Jeroen van Rijn 3d4e23d741 Add example of a custom formatter. 2024-06-13 11:33:37 +02:00
Jeroen van Rijn 50564a301e Update kernel32 struct DCB. 2024-06-13 10:22:44 +02:00
Jeroen van Rijn f8f6f2dada Merge pull request #3749 from Feoramund/fix-w
Improve support for `%w`
2024-06-13 10:07:48 +02:00
korvahkh 104ca2ce22 Merge branch 'odin-lang:master' into fix-omitempty-comma 2024-06-13 01:27:44 +00:00
Feoramund abe5c2ca83 Add test for %w 2024-06-12 21:07:15 -04:00
Feoramund 0c9f487783 Fix and document %w verb for core:fmt 2024-06-12 20:35:50 -04:00
gingerBill a67df07392 Merge pull request #3742 from karl-zylinski/fix-raymath-matrix-to-float
Make rl.MatrixToFloatV do same thing in Odin as in C
2024-06-12 23:15:48 +01:00
Jeroen van Rijn 05972eb26b Merge pull request #3746 from jasonKercher/add-commtimeouts
add COMMTIMEOUTS, get/setCommTimeouts
2024-06-12 21:50:10 +02:00
gingerBill 4ccc473e97 Merge pull request #3745 from karl-zylinski/rlgl-add-missing-types
rlgl: Pull in raylib and expose missing types
2024-06-12 20:48:22 +01:00
gingerBill 90815452ca Merge pull request #3747 from Feoramund/fix-3739
Fix #3739
2024-06-12 20:48:02 +01:00
jasonkercher a804463a57 add COMMTIMEOUTS, get/setCommTimeouts 2024-06-12 15:31:59 -04:00
Feoramund 33270f14a4 Fix #3739 2024-06-12 15:31:43 -04:00
Karl Zylinski c7ea4ec71c rlgl: Pull in raylib and expose missing types, so it is the same as rlgl.h. This makes rlgl less stand-alone, but I left some notes in rlgl.odin how to easily make it stand-alone if one really wants to. 2024-06-12 21:13:12 +02:00
Karl Zylinski d37b5a7b67 Make rl.MatrixToFloatV transpose the matrix before transmuting it to [16]f32, so it does the same thing as the raymath version implemented in C. 2024-06-12 19:54:14 +02:00
Feoramund 1128bd1d7f Use syscall_bsd on NetBSD 2024-06-12 13:34:36 -04:00
Feoramund 20c32c807d Fix info.init_os_version on FreeBSD
It's possible for the return string to be longer than 128 characters
these days, so I've increased it to 1024, same as the other BSDs.

SYSCTL was otherwise erring out due to lack of buffer space.
2024-06-12 13:10:19 -04:00
Feoramund 5b5402fb23 Add intrinsics.syscall_bsd
This is a BSD-style syscall that checks for a high Carry Flag as the
error state. If the CF is high, the boolean return value is false, and
if it is low (no errors) then the boolean return value is true.
2024-06-12 13:07:13 -04:00
Laytan Laats 108b8feb35 Add vendor:wgpu 2024-06-12 17:22:02 +02:00
Jeroen van Rijn 603581aa53 Merge pull request #3738 from Kelimion/xml_attr
Xml attr
2024-06-12 14:06:40 +02:00
gingerBill c5f7788652 Check to see if matrices are exactly the same type 2024-06-12 12:54:57 +01:00
gingerBill f57c03c170 Improve matrix type hinting rules a little 2024-06-12 12:40:29 +01:00