Commit Graph

736 Commits

Author SHA1 Message Date
Karl Zylinski
3637dcbd04 Simplified error messages in parse_build_tag, removed the idea of making multiple notted operating systems since it was misinformed. 2024-09-09 21:03:28 +02:00
Karl Zylinski
73e4954346 Better #+build tag error messages: Error when using more than one !notted operating system per build line. Error when using more than one operating system within a 'kind', such as writing #+build windows linux. 2024-09-08 03:13:21 +02:00
Karl Zylinski
dc767da12b Make tags use #+ syntax instead of //+ syntax so it no longer looks like a comment. Old style still works but is deprecated with a warning. Using unknown tags is now an error instead of a warning. There is a new token for #+ which consumes the whole line (or until it hits a comment). The tags are parsed like before. There are errors to tell you if you use something invalid in the pre-package-line block. 2024-09-08 01:50:56 +02:00
avanspector
43ec2b9253 checker: delay foreign block checking
if file scope, otherwise as before
2024-08-26 20:59:16 +02:00
gingerBill
8ba87e01bd Improve parse_enforce_tabs usage 2024-08-24 13:56:30 +01:00
gingerBill
b6d9a0c32e Manually implement tail-recursion for parse_if_stmt 2024-08-24 13:16:55 +01:00
gingerBill
a4cc207022 Add a recursion depth limit for #3987 with a consideration to use a switch statement or refactor the code to not use a large if-else chain 2024-08-24 12:59:17 +01:00
Jeroen van Rijn
9553bc3689 If missing type is newline, print "newline", not \n
Turns:

W:/Odin/bug/bug.odin(3:27) Syntax Error: Expected a type, got '
'
        Storage :: distinct map[]

Into:

W:/Odin/bug/bug.odin(3:27) Syntax Error: Expected a type, got newline
        Storage :: distinct map[]
2024-08-17 17:25:52 +02:00
Jeroen van Rijn
07d2aba310 Simplify exe path check. 2024-07-22 16:36:21 +02:00
Jeroen van Rijn
90a4d12b30 Fix .exe path is directory check. 2024-07-22 16:11:33 +02:00
Jeroen van Rijn
39657e4d96 Fix #3473
Fix the problem where the initial package's directory name ended in .odin.
2024-07-22 15:15:51 +02:00
gingerBill
a45e05bb18 Remove need for BlockingMutex in Arena 2024-07-15 01:36:54 +01:00
gingerBill
018026d844 Use gb_zero_* calls 2024-07-15 00:36:00 +01:00
gingerBill
139c1bcdda Comment out debug code 2024-07-15 00:25:41 +01:00
gingerBill
edc793d7c1 Add #no_capture args: ..T to reuse the backing array stack memory 2024-07-14 11:39:05 +01:00
gingerBill
36301d0359 Give better syntax error messages for things like #define Example 123 2024-07-10 13:03:38 +01:00
gingerBill
886ee66e7f Cache files, env, and args 2024-07-09 14:16:56 +01:00
gingerBill
1eb0bc1408 Remove *_test.odin; always compile it for all targets 2024-07-04 14:43:57 +01:00
gingerBill
8b49549fd3 Merge pull request #3859 from laytan/wasm-stbtt-object-linking-preopens
wasm: support `vendor:stb/truetype` and `vendor:fontstash`
2024-07-02 22:14:54 +01:00
Laytan Laats
6f1cc8071c wasm: add foreign import and linking of wasm object files 2024-07-02 15:28:08 +02:00
gingerBill
fb0b95bcad Merge pull request #3760 from Feoramund/refactor-show-error-on-line
Refactor `show_error_on_line`
2024-07-01 11:03:29 +01:00
gingerBill
34fce83d66 Improve -strict-style rules for if-else statements 2024-06-29 20:04:34 +01:00
gingerBill
b1a1da6618 Add -vet-tabs 2024-06-29 19:54:31 +01:00
gingerBill
2187f3e7ff -strict-style enforce 1TBS (mostly) 2024-06-29 19:14:24 +01:00
gingerBill
906afa4154 Allow for when x in y { (minor oversight in syntax) 2024-06-29 10:13:15 +01:00
gingerBill
67e9a6fd9b Improve error reporting on "Failed to parse fail" and show the line error if possible 2024-06-28 10:04:08 +01:00
gingerBill
862a04376f Improve tokenizing wrong number literals 2024-06-28 09:16:01 +01:00
gingerBill
c098739484 Remove @(warning) and #warning(...) 2024-06-25 09:36:59 +01:00
gingerBill
dab3c832e0 Add #warning(<string>) builtin compile time procedure 2024-06-20 15:32:30 +01:00
Feoramund
8626d38db1 Fix displaying emptiness when error is on first line 2024-06-14 13:02:54 -04: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
gingerBill
f1779c85de Fix #3727 2024-06-10 18:50:53 +01:00
gingerBill
1945218f6d Improve parsing for label: #reverse for and label: #partial switch 2024-06-10 14:18:33 +01:00
Feoramund
9d28f2e18c Fix or_or_<branch> error messages 2024-06-09 22:46:45 -04:00
gingerBill
d91054b615 Change parser to use ^Expr rather than string for the foreign import paths 2024-05-28 00:27:13 +01:00
gingerBill
a1b8749e74 Delay checking foreign import paths until after global scope is checked 2024-05-28 00:23:23 +01:00
gingerBill
38fffff06a Begin moving foreign import import paths to be evaluated in the semantic phase rather than parsing. 2024-05-27 23:51:43 +01:00
gingerBill
542c3d7561 Improve "Expected a type" syntax error 2024-05-20 13:32:16 +01:00
gingerBill
0cf9dcd314 Make .. ranges a complete error rather than a warning now.
This should have been an error years ago.
2024-05-13 18:15:29 +01:00
gingerBill
215ef3d985 Make core:runtime etc a warning, and an error with -vet 2024-05-13 13:26:47 +01:00
Feoramund
1935811b2c Suggest -all-packages if testing empty directory 2024-05-12 19:51:19 -04:00
gingerBill
710bb4369f Fix #3567 2024-05-10 13:55:15 +01:00
gingerBill
f54977336b With -vet-style, give suggestion of separating where clauses with a comma rather than '&&'
This improves the error messages
2024-05-09 15:56:00 +01:00
gingerBill
0da6a3e214 Fix #3530 2024-05-07 11:42:48 +01:00
joakin
60ef4fda4d Recognize dynamic library names like libraylib.so.5.0.0 2024-04-19 13:35:53 +02:00
gingerBill
7e582dd671 Add basic suggestion to missing package name 2024-04-15 12:43:27 +01:00
gingerBill
0df9c8bffc Improve error messages for people using keywords instead of identifiers 2024-04-08 12:04:33 +01:00
gingerBill
83e2f5ff74 Add better error messages with suggestions for using context as an identifier 2024-04-04 17:01:31 +01:00
gingerBill
7b387fd3aa Improve C-like syntax mistakes error messages 2024-03-27 13:10:46 +00:00
gingerBill
12ec9bce7d Fix parsing bug on bit_set[;x] 2024-03-27 13:05:15 +00:00