Commit Graph

275 Commits

Author SHA1 Message Date
gingerBill
dab3c832e0 Add #warning(<string>) builtin compile time procedure 2024-06-20 15:32:30 +01:00
gingerBill
1945218f6d Improve parsing for label: #reverse for and label: #partial switch 2024-06-10 14:18:33 +01:00
Feoramund
b2f9f0af68 Fix some typos 2024-06-04 19:01:30 -04:00
gingerBill
0ef0894213 Fix to bl.tok = path 2024-06-03 22:55:24 +01:00
gingerBill
4dac577caa Add attributes to Foreign_Import_Decl in clone 2024-06-03 22:21:54 +01:00
gingerBill
8e9716ea2f Add ast.Foreign_Import_Decl to ast.clone 2024-06-03 22:20:39 +01:00
gingerBill
50b4a63fe1 Add ast.Foreign_Impot_Decl.fullpaths to walk.odin 2024-06-03 22:02:35 +01:00
gingerBill
d91054b615 Change parser to use ^Expr rather than string for the foreign import paths 2024-05-28 00:27:13 +01:00
Jeroen van Rijn
dc744411c5 Deprecate core:odin/printer + format in favor of OLS. 2024-05-24 14:49:11 +02:00
gingerBill
b4d0b1d17d Merge pull request #3544 from ntn9995/fix-parser-empty-or-no-pkg
Fix core:odin/parser crashing on empty and/or no package files
2024-05-10 16:01:16 +01:00
gingerBill
20d35acce1 Fix parser 2024-05-10 15:59:14 +01:00
ikarus
3add85e7a7 fix typo & free memory when skipping empty files 2024-05-10 14:51:09 +01:00
ikarus
60b6c798a5 tabs for indentation 2024-05-08 09:07:53 +01:00
ikarus
16fbfd0418 ignore empty files and errors on no package 2024-05-06 09:25:22 +01:00
RilleP
330c161625 remove semicolon 2024-04-11 09:36:28 +02:00
RilleP
730f992bff fix indentation 2024-04-10 19:16:38 +02:00
RilleP
95a38d5a96 Merge branch 'master' into parsing-package-fixes 2024-04-10 19:10:33 +02:00
Laytan Laats
af6d2480fa add bit_field parsing to core:odin/parser
Also adds it to the core type thingy like it is in the compiler.
2024-04-10 01:01:32 +02:00
Laytan Laats
3a0df80066 correct newly found vets 2024-04-03 00:52:58 +02:00
gingerBill
2938def707 Remove dead comment 2024-04-01 13:27:51 +01:00
gingerBill
6d7afd3fa9 Update format version 2024-03-21 11:59:45 +00:00
gingerBill
006ea11c56 Update doc-format for #by_ptr and #no_broadcast parameters 2024-03-21 11:58:32 +00:00
gingerBill
29e5f94c2a Add #no_broadcast procedure parameter to disallow automatic array programming broadcasting on procedure arguments 2024-03-21 11:52:48 +00:00
Aaron Kavaler
096b4f5454 fixed issue #3264 regarding core:odin/parser not allowing a newline at the end of a compound literal 2024-03-18 20:33:02 -07:00
gingerBill
afcc2889ec Support compound literals for bit_field 2024-02-22 18:41:15 +00:00
gingerBill
c9e37a08be Add backing type of a bit_field to the doc-format 2024-02-22 17:41:22 +00:00
gingerBill
dcbcf75269 Add doc-format support for bit_field 2024-02-22 17:37:42 +00:00
gingerBill
213b2fd0f8 Add bit_field as a keyword 2024-02-22 14:01:23 +00:00
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
Rikard Petré
239d4e1076 odin/tokenizer: Reset insert_semicolon to false in tokenizer.init to fix bug when tokenizing multiple files. 2024-01-20 16:09:41 +01:00
Rikard Petré
99825a28d7 odin/parser: Allow semicolon after return statement for the case:
if x do return y;
else do return z;
2024-01-20 16:00:41 +01:00
Rikard Petré
144504a752 odin/parser: Fix parsing of struct literal/call expression when closing brace/paren is on a new line without a comma after the last argument. 2024-01-20 15:57:14 +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