Commit Graph

6161 Commits

Author SHA1 Message Date
Jeroen van Rijn
2fae6eda23 [i18n] Initial i18n support.
- Add initial GetText .MO parser
- Add translation struct and helpers
- Pluralized lookup

 TODO:
- Support for more translation catalog file formats.
2022-04-28 18:58:49 +02:00
Jeroen van Rijn
e53ba3b116 Allow -error-pos-style:default as an alias for odin 2022-04-28 18:18:25 +02:00
Jeroen van Rijn
1ed84a064b Make -error-pos-style case-insensitive. 2022-04-28 18:12:55 +02:00
Jeroen van Rijn
79019c7a09 Merge pull request #1751 from Kelimion/error-pos-style
Fix -error-pos-style:unix
2022-04-28 17:52:47 +02:00
Jeroen van Rijn
a1002e6960 Fix -error-pos-style:unix 2022-04-28 17:46:36 +02:00
Jeroen van Rijn
62139cb5a4 Merge pull request #1342 from Kelimion/xml
Initial version of `core:encoding/xml`.
2022-04-28 15:54:28 +02:00
Jeroen van Rijn
127b0ba65e [xml] Enable tests. 2022-04-28 15:46:36 +02:00
Jeroen van Rijn
80878264b6 [xml] Speedup. 2022-04-28 15:29:00 +02:00
gingerBill
9fcba99ca2 Merge pull request #1749 from karl-zylinski/d3d12-binding-fixes
D3D12 binding fixes
2022-04-27 22:16:24 +01:00
Karl Zylinski
03c9212600 Added some additional IID versions of Direct3D 12 UUIDs that I missed during my first pass. All are accounted for now. 2022-04-27 22:30:28 +02:00
Karl Zylinski
5650087aa3 Merge remote-tracking branch 'origin/master' into d3d12-binding-fixes 2022-04-27 20:50:54 +02:00
Karl Zylinski
67689ecb21 Typo fix in d3d12.odin 2022-04-27 20:47:05 +02:00
Karl Zylinski
cd13dedb36 D3D12 binding fixes: Added dxgi.IID versions of all the UUIDs in d3d12.odin so that the IIDs can be used to fetch interfaces properly. Also fixed an issue where GetDesc, GetCPUDescriptorHandleForHeapStart and GetGPUDescriptorHandleForHeapStart had the wrong signature due to an old D3D12 header bug, more info: https://stackoverflow.com/questions/34118929/getcpudescriptorhandleforheapstart-stack-corruption 2022-04-27 20:12:44 +02:00
Jeroen van Rijn
6df21d6a9f Merge branch 'master' into xml 2022-04-27 16:13:47 +02:00
Jeroen van Rijn
c5982e52d5 Merge pull request #1748 from Kelimion/test-assets
Move Odin CI test assets over to its own repository.
2022-04-27 16:04:15 +02:00
gingerBill
bd73b2845b Unify default Sema and Atomic_Sema behaviour 2022-04-27 15:03:48 +01:00
Jeroen van Rijn
da0f722aad Move Odin CI test assets over to its own repository. 2022-04-27 15:56:45 +02:00
gingerBill
904f0407f8 Add intrinsics.type_is_multi_pointer 2022-04-27 14:53:26 +01:00
gingerBill
fbbb0d7610 Update intrinsics.odin for documentation 2022-04-27 14:51:04 +01:00
gingerBill
3a9b0a22e7 Add core:container/intrusive/list 2022-04-27 14:27:33 +01:00
Jeroen van Rijn
c4e0d1efa1 Merge branch 'master' into xml 2022-04-27 14:37:15 +02:00
gingerBill
9349dfba8f Add new builtin container_of 2022-04-27 12:39:45 +01:00
gingerBill
9692496989 Add intrinsics.type_field_type 2022-04-27 12:27:53 +01:00
gingerBill
a6cef2e50e Update LICENSE 2022-04-26 21:47:45 +01:00
Jeroen van Rijn
d262eda91c Update Makefile 2022-04-26 15:10:31 +02:00
Jeroen van Rijn
40f0f5ad8d Update CI for math library. 2022-04-26 15:01:09 +02:00
Jeroen van Rijn
1c03e68057 Update CI. 2022-04-26 14:56:28 +02:00
Jeroen van Rijn
f1c1cfb6d2 Merge pull request #1747 from Kelimion/filename-merge
Filename generation
2022-04-26 14:52:58 +02:00
Jeroen van Rijn
ba5e33bc35 Update CI workflow. 2022-04-26 14:51:16 +02:00
gingerBill
80df9fbc65 Merge pull request #1745 from eisbehr/patch-1
Make allocator in pool_add_task() explicit
2022-04-26 13:49:44 +01:00
Jeroen van Rijn
b68ab0dd6d Merge branch 'master' into filename-merge 2022-04-26 14:45:00 +02:00
Jeroen van Rijn
5e11ad2e1e Update test paths. 2022-04-26 14:23:23 +02:00
Jeroen van Rijn
a5342a0126 Address edge cases. 2022-04-26 13:14:09 +02:00
gingerBill
c81fd2e5dd Fix #1644 2022-04-26 11:45:46 +01:00
gingerBill
3bd7122959 Fix #1720 2022-04-26 11:42:01 +01:00
gingerBill
530401e5ee Fix #1729 2022-04-26 11:38:32 +01:00
gingerBill
a412d34574 Fix #1740 2022-04-26 11:35:34 +01:00
Florian Behr
ee67a0b9a1 reorder procedure parameters to make sure the optional argument in pool_add_task() is last, and the argument order is consistent with pool_init() 2022-04-25 14:08:09 +02:00
Florian Behr
ca6a1db757 fix doc comment for pool_init 2022-04-25 13:41:39 +02:00
Florian Behr
1fb76ad768 change usage in demo.odin 2022-04-25 13:41:19 +02:00
Florian Behr
e01662c139 Make allocator in pool_add_task() explicit 2022-04-25 13:23:05 +02:00
Jeroen van Rijn
63331ef731 Revert "Merge pull request #1702 from Kelimion/filename_generation"
This reverts commit a40a53b104, reversing
changes made to 5422a3b17e.
2022-04-24 19:53:36 +02:00
Jeroen van Rijn
a40a53b104 Merge pull request #1702 from Kelimion/filename_generation
Compiler: Add early error for output path being a directory.
2022-04-24 15:15:51 +02:00
Jeroen van Rijn
9f8d90f466 Update CI paths for issue tests. 2022-04-24 14:28:00 +02:00
Jeroen van Rijn
3d2856db31 Update tests to use new filename generation code. 2022-04-24 14:19:25 +02:00
Jeroen van Rijn
f4723aea4c Remove redundant bit for non-Windows. 2022-04-24 13:37:26 +02:00
Jeroen van Rijn
76d48b38d3 Compiler: Allow -out: to not have an extension on *nix for executables (only). 2022-04-24 13:37:26 +02:00
Jeroen van Rijn
3cab2592c3 Compiler: Add early error for output path being a directory.
- Introduce new `Path` type and an array of build paths on the build context.
- Resolve input and output paths/files early (before parsing).
- Error early if inputs are missing or outputs are directories.
- Plumb new file path generation into linker stage instead of its adhoc method.

TODO:
- Remove more adhoc file path generation in parser and linker stage.
- Make intermediate object file generation use new path system.
- Round out and robustify Path helper functions.
2022-04-24 13:37:26 +02:00
Jeroen van Rijn
5422a3b17e Merge pull request #1743 from Tetralux/filepath-stems
[path/filepath] Add file stem and long-extension procedures
2022-04-23 22:33:31 +02:00
Tetralux
b44b6e7e50 [path/filepath] Add file stem and long-extension procedures
Adds stem(), short_stem(), and long_ext(); also adds doc-comments to base() and ext().

The 'stem' is usually 'the name' of the file; the basename without the file extension.
To this end, this adds stem(), which is such that:

	stem(path) + ext(path) = base(path)

However, 'file extension' has two different meanings to what constitutes it!

 > What is the extension of: 'name.tar.gz' ?

Colloquially, you would likely think of it as 'a tarball' - which you might think is '.tar.gz'.
But, if you're writing code to process a file of this type, you would first treat it
as a Gzip file, and then treat the result as a TAR file - i.e: '.gz' ... _followed by_ '.tar'.

ext() returns '.gz' here, since that is the most-immediate format that you would need to use
to decode it; it would be a Gzip stream.

Sometimes though, you do actually want to consider these longer file extensions.

Perhaps you're extracting a tarball, and what to know what to call the intermediate tar file;
perhaps you want to check to see if this file is a tarball, or just a Gzip file;
or maybe you just want 'the name' of the file, and not this "strange 'name-and-part-of-the-extension' thing".

So, this also adds short_stem() and long_ext(), such that:

	short_stem(path) + long_ext(path) = base(path)

Thus, we can use either, but the most immediately-useful one is the easiest to reach for:

      stem('name.tar.gz') -> 'name.tar'
       ext('name.tar.gz') -> '.gz'

short_stem('name.tar.gz') -> 'name'
  long_ext('name.tar.gz') -> '.tar.gz'

These procedures are identical to their counterparts when the path only has a simple extension:

      stem('name.txt') -> 'name'
       ext('name.txt') -> '.txt'

short_stem('name.txt') -> 'name'
  long_ext('name.txt') -> '.txt'
2022-04-23 20:25:59 +00:00