244 Commits

Author SHA1 Message Date
gingerBill
3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
gingerBill
621b3c7829 Add missing clone for Struct_Type 2024-01-28 17:34:32 +00:00
gingerBill
68df35b378 Add #field_align(N)
It sets the minimum alignment for the fields within a struct. This cannot be used with `#packed`, but can be used with `#align(N)`.
If `#align(N)` is less than `#field_align(N)`, then a warning will be printed.
2024-01-28 17:33:29 +00:00
DanielGavin
f63f28302e Recover from faulty parameter in parse_proc_type 2024-01-22 20:35:26 +01:00
DanielGavin
8e395cc6e9 Fixed crash in core:odin/parser with #reverse 2023-12-13 20:08:26 +01:00
Jeroen van Rijn
ae40946198 Merge pull request #2950 from laytan/fix-nil-exceptions-with-incomplete-code-parse
fix nil exceptions with incomplete code parse
2023-11-24 13:39:58 +01:00
Laytan Laats
08d032859f use start pos as end pos if end node is nil 2023-11-22 16:16:43 +01:00
Laytan Laats
bd19081543 fix nil exceptions with incomplete code parse
This makes the parser more fault tolerant because the different
parse_foo procs return nil when in an invalid state, which is fine most
of the time but when creating a node it would crash accessing its
position.
2023-11-12 01:53:14 +01:00
flysand7
270348b112 [core]: Remove do keyword from the core library 2023-11-11 20:36:38 +11:00
Fabian Sperber
bce66e3b42 Add or_break and or_continue to the list of tokens that have an automatic semicolon added at the end of the line 2023-10-09 21:48:04 +02:00
gingerBill
14adcb9db8 Use or_break and or_continue where appropriate in the core library 2023-09-30 15:34:39 +01:00
gingerBill
41a22bd83d or_break and or_continue to core:odin packages 2023-09-30 15:09:59 +01:00
gingerBill
648b83d6ea Add or_break and or_continue constructs 2023-09-30 15:04:17 +01:00
Fabian Sperber
886d0de040 Remove auto_cast from field_flags
- auto_cast is parsed as its own expression
2023-09-05 23:14:55 +02:00
Fabian Sperber
16d797cb01 Add #const field flag 2023-09-05 22:57:40 +02:00
Fabian Sperber
bbf9678756 Fix parsing #force_inline call expression with or_return 2023-09-05 22:35:30 +02:00
DanielGavin
64a63b3879 Add #reverse to odin/parser. 2023-09-03 16:15:03 +02:00
gingerBill
cd74cdfdaf Remove switch in in favour of switch _ in 2023-08-08 14:57:25 +01:00
gingerBill
488a38a96d Merge pull request #2649 from hchac/allow-newline-field-list-separator
Match C++ parser behavior in allowing newlines before a closing brace.
2023-08-07 11:45:08 +01:00
gingerBill
006bd2fe17 Merge pull request #2696 from hwchen/hwchen/fix-parse-call-expr-ellipses
core:odin/parser allow args after varargs in parse_call_expr
2023-08-05 17:07:28 +01:00
gingerBill
c91898a888 Remove #relative slices; Replace with #relative multi-pointers 2023-08-05 16:05:39 +01:00
Walther Chen
4b9afd787c core:odin/parser allow args after varargs in parse_call_expr 2023-08-03 22:45:21 -04:00
gingerBill
44ea82f845 Clean up usage of using throughout core and vendor 2023-07-31 11:46:40 +01:00
gingerBill
0de7df9eab Improve //+vet; remove using in many places; add //+vet !using-stmt where necessary 2023-07-31 11:37:14 +01:00
hchac
4c0e9f1f89 Match CPP parser behavior in allowing newlines before a closing brace. 2023-07-11 16:15:06 -04:00
gingerBill
600c97cc0f Add missing Allocator_Error and @(require_results) to many procedures 2023-05-22 11:34:38 +01:00
gingerBill
7abaf77292 Add struct #no_copy 2023-04-15 15:47:18 +01:00
Fabian Sperber
33798b8b80 Need to forward the name of the directive, not the hash token 2023-03-20 20:09:30 +01:00
gingerBill
ef372bd861 Replace #optional_second with #optional_allocator_error 2022-09-12 13:08:32 +01:00
gingerBill
a83ca2120e Remove unused import 2022-08-14 21:50:41 +01:00
gingerBill
81799f7f78 Fix #1950 2022-08-14 21:50:21 +01:00
gingerBill
5e3cf45df3 Add #soa pointer type to aid with refactoring to #soa data types
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +01:00
gingerBill
5168cf03a9 Remove dead #maybe code 2022-08-01 15:38:50 +01:00
gingerBill
0ec4d97bfd Correct parser logic for is_token_field_prefix 2022-08-01 15:24:17 +01:00
gingerBill
97acc57649 Simplify field prefix handling 2022-08-01 13:17:10 +01:00
gingerBill
83c8c48ed7 Simplify ast parsing for prefixes 2022-08-01 13:07:49 +01:00
gingerBill
c90b7c38f1 Rename strings.Builder procedures to be consistent with the rest of the core library 2022-07-11 11:50:08 +01:00
Pablo Narvaja
6ffe814ca7 assign package docs to file docs 2022-06-23 18:13:34 -03:00
hikari
698fcb7813 mem: replace size procedures with constants 2022-04-06 18:44:43 +03:00
gingerBill
b6b3377786 Remove unneeded semicolons 2022-03-24 12:02:50 +00:00
gingerBill
13cb894b30 Update core:odin for union #shared_nil 2022-03-24 12:00:27 +00:00
gingerBill
d9ca4eb4d6 Add nil check on ast.walk 2022-03-16 11:59:28 +00:00
gingerBill
913d802e33 Fix ast.clone_node 2022-03-03 23:10:38 +00:00
gingerBill
2944969ca0 Correct clone_node 2022-03-03 14:01:37 +00:00
gingerBill
bd1b54e0db Fix #1503 2022-03-03 13:58:22 +00:00
gingerBill
fcab5508be Merge branch 'master' into odin-ast-changes 2022-03-03 13:56:34 +00:00
gingerBill
edc13c29df Merge pull request #1331 from DanielGavin/parser-fault-recovery
Recover from closing brace not found in field list
2022-02-15 16:26:16 +00:00
gingerBill
9cf937fef0 Merge pull request #1430 from DanielGavin/parser-fix
Fix return stmt when it's one lined(check for close brace).
2022-02-15 15:47:40 +00:00
gingerBill
ad6ea3d6aa Replace any with union for subtyping in core:odin/ast 2022-02-06 13:31:16 +00:00
gingerBill
cda9fd5271 Add tag to ast.Comp_Lit 2022-02-06 11:59:12 +00:00