Commit Graph

67 Commits

Author SHA1 Message Date
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
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
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
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
gingerBill
ef372bd861 Replace #optional_second with #optional_allocator_error 2022-09-12 13:08:32 +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
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
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
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
Tetralux
9b2fe56d14 Parse #no_nil on unions 2021-12-25 18:58:08 +00:00
Daniel Gavin
b0db90de96 Add Any_Int as allowed flag in field signatures. 2021-11-09 14:29:53 +01:00
gingerBill
90d587df13 Support matrix type in core:odin 2021-10-27 23:49:37 +01:00
gingerBill
344abf2cb2 Make core and vendor adhere to -vet, -strict-style, and -disallow-do 2021-09-11 16:40:19 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
gingerBill
ce7698c20e Correct core library usage of the new mem.new behaviour 2021-08-23 19:29:01 +01:00
gingerBill
19bf12aa09 Update odin/ast for multi pointers 2021-08-22 11:46:12 +01:00
gingerBill
4e1c9b71f4 Update core:odin/* for or_else and or_return 2021-08-15 19:05:55 +01:00
gingerBill
9e2eb717fe Correct newline_limit logic 2021-05-21 15:22:35 +01:00
gingerBill
df3512b112 Make core:odin use a string for the source rather than []byte 2021-05-16 12:38:27 +01:00
gingerBill
c3b3194a00 Update builtin procedures to support the new allocator features (without breaking other code) 2021-04-19 22:44:20 +01:00
gingerBill
bec42e8dd3 Improve core:odin/ast ast.Range_Stmt to use generic number of vals rather than the fixed two to aid with parsing errors 2021-03-24 12:34:06 +00:00
gingerBill
08f7d3edbe Allow $ in polymorphic record parameter fields (but disallow mixing) 2021-03-23 22:59:10 +00:00
gingerBill
41b854f192 Remove #opaque types 2021-02-23 15:45:06 +00:00
gingerBill
28f279329d Remove bit_field keyword and parsing logic 2021-02-23 15:29:54 +00:00
gingerBill
28ed310f31 Remove "pure" and "pure_none" calling conventions 2021-02-23 13:10:23 +00:00
gingerBill
cffbd2d276 Add odin/parser/parse_files.odin 2020-12-13 17:09:41 +00:00
DanielGavin
934809397f small fixes to the parser 2020-12-09 21:33:10 +01:00
gingerBill
98c8fde098 Remove unused tokens 2020-12-06 13:17:48 +00:00
gingerBill
1ac84b09a1 Add comments to ast.walk related entities 2020-12-06 13:04:11 +00:00
gingerBill
21d8562923 Add ast.walk and ast.inspect 2020-12-06 12:59:26 +00:00
gingerBill
c8360f4fff Update ast.clone 2020-12-06 12:08:44 +00:00
gingerBill
ea60db9f53 Add inline asm expression to odin/parser 2020-12-06 01:14:55 +00:00
gingerBill
d94414b0f4 Correct ternary if/when parsing 2020-12-06 00:15:35 +00:00
gingerBill
80fead1de5 Add ast.Selector_Expr_Call 2020-12-06 00:03:45 +00:00
gingerBill
fc4fdd588e Remove usage of do in core library 2020-09-23 17:17:14 +01:00
gingerBill
4cf240ca05 Fix odin/parser issues 2020-09-15 22:14:23 +01:00
zhibog
c704de8442 Added the #maybe directive to the union struct in the AST. Also added it to the parsing code for a union. 2020-04-25 18:21:32 +02:00
zhibog
3a1bee19a9 Added a bool flag to the Block_Stmt struct to have information whether or not 'do' was used vs brackets in the AST 2020-04-18 21:34:14 +02:00