Commit Graph

569 Commits

Author SHA1 Message Date
gingerBill
5fd64f48ee Minor procedure rename 2021-08-08 12:48:44 +01:00
gingerBill
57a17a708b Improve core:odin/parser 2021-08-04 00:10:41 +01:00
gingerBill
c3e4509d17 Improve error message when using a comma rather than a semicolon in a bit_set 2021-08-03 15:46:14 +01:00
gingerBill
7f3d4cb504 Remove the literal conversion logic to the parser from the tokenizer 2021-08-02 00:53:45 +01:00
gingerBill
be76da2c90 Begin optimizing tokenizer; Replace gb_utf8_decode with utf8_decode (CC but easier to change later) 2021-08-01 23:56:17 +01:00
gingerBill
a5d6fda433 Define which mutexes are blocking and recursive explicitly 2021-07-27 23:14:01 +01:00
gingerBill
9cd5ea59dd Big simplification and improvement of the entity collection system, reducing unneeded steps for packages 2021-07-27 20:45:50 +01:00
gingerBill
116e98b378 Improve default scope size 2021-07-27 10:59:39 +01:00
gingerBill
ae25787f48 Fix syntax error for a missing package name 2021-07-26 11:43:17 +01:00
gingerBill
99080d41f3 INTERNAL USE ONLY: //+lazy build flag 2021-07-25 13:06:09 +01:00
gingerBill
ed8a6f872d Move things around for sanity checking for multithread preparation 2021-07-10 21:29:49 +01:00
gingerBill
3afec0bcbe Fix #1054 2021-07-10 11:42:21 +01:00
gingerBill
a98eee145d Remove try; Replace try x else y with or_else(x, y) 2021-07-05 16:23:13 +01:00
gingerBill
c6b9b3b9a4 Fix try parsing for expression statements 2021-07-04 22:52:12 +01:00
gingerBill
4b831dbddd Try try and or_else built-in procedures with operators try and try else 2021-07-04 12:37:21 +01:00
gingerBill
f19bb0f4d4 Make default calling convention code more correct to read 2021-06-08 14:33:49 +01:00
gingerBill
28e9a4f79c Replace js_wasm32 with freestanding_wasm32 2021-06-08 12:18:26 +01:00
gingerBill
ba3f2a6a0c All spaces in import-like paths 2021-06-03 10:28:45 +01:00
gingerBill
673134185a Fix #996 2021-05-31 20:54:09 +01:00
gingerBill
9c54ed5792 Add range-based error messages to -verbose-errors
Example:
Cannot convert '(1 + 2)' to 'untyped bool' from 'untyped integer'

	x := (1 + 2) * true;
	     ^~~~~~^
2021-05-19 14:15:57 +01:00
gingerBill
5108ebf015 Replace error calls with Token to use TokenPos 2021-05-19 13:02:44 +01:00
gingerBill
86dbcb1b20 Add -verbose-errors which shows the error in the line of code 2021-05-19 12:57:30 +01:00
gingerBill
ce08e832f7 Allow ..= alongside .. as a "full range" operator; Update core:odin/parser etc 2021-05-16 12:34:35 +01:00
gingerBill
5d03bc61b8 Tokenize ++ and -- as tokens but disallow them in the parser, and give better error messages for they are used as operators/statements 2021-05-15 19:34:46 +01:00
gingerBill
5e31c04a01 Disallow duplicate unary operators for +, -, and ~ 2021-05-15 19:13:34 +01:00
gingerBill
c6c5af527b Fix #746 2021-05-12 23:43:16 +01:00
gingerBill
278de3a92f Unify AstTernaryExpr with AstTernaryIfExpr
Allow for both syntaxes `x if cond else y` and `cond ? x : y`
Removes the confusing semantics behind `?:` which could be `if` or `when` depending on the context.
2021-05-05 15:22:54 +01:00
gingerBill
bb9c1d04db Fix missing newline check 2021-05-04 23:41:35 +01:00
gingerBill
77e2e1e1d0 Add missing skip_possible_newline_for_literal calls 2021-05-03 12:02:08 +01:00
gingerBill
348d25c43a Fix parsing error for for 2021-05-02 00:11:36 +01:00
gingerBill
ced7700cdb Add extra check for #no_bounds_check etc being followed by a newline or empty statement 2021-05-01 17:59:30 +01:00
gingerBill
406d2ab6ba Simplify/Fix the state_flag behaviour for code generation 2021-05-01 17:42:59 +01:00
gingerBill
24fce21d90 Add "naked" calling convention (removes prologue and epilogue) 2021-04-28 10:49:30 +01:00
gingerBill
94fd59e6f0 Make compound literals require trailing commas if followed by a newline 2021-04-26 23:05:00 +01:00
gingerBill
c07ab5f9ad Change expr_level increment rules within a compound literal 2021-04-26 23:02:00 +01:00
gingerBill
04535b2913 Fix constant aliasing for debug information 2021-04-26 22:36:20 +01:00
gingerBill
7e0c78eae7 Fix logic for \n ignoring 2021-04-26 21:39:49 +01:00
gingerBill
6d1eb473cf Correct \n ignore rules 2021-04-26 21:25:44 +01:00
gingerBill
898245431f Make -strict-style the default #871 2021-04-26 21:07:58 +01:00
gingerBill
c29b643a58 Move out some intrinsics into separate procedures in llvm_backend.cpp; Rename InlineRangeStmt to UnrollRangeStmt (eventually merge the two AST nodes) 2021-04-24 15:00:01 +01:00
gingerBill
f1bdd2e60f Improve #optional_ok logic for procedures; Add #optional_second for package runtime usage 2021-04-19 22:31:14 +01:00
gingerBill
fbd01660ee Experiment with new grammatical parsing rule for expression level (-strict-style) idea 2021-03-30 11:48:32 +01:00
gingerBill
a611cf545d Add basic error correction in parser to check for unattached else 2021-03-26 11:39:46 +00:00
gingerBill
a5329ae48c Add better package declaration specific error message (#878) 2021-03-24 14:34:30 +00:00
gingerBill
0e3ecc350a Make the parser support as many identifiers on the LHS in for in loops to improve error messages 2021-03-24 12:11:00 +00:00
gingerBill
ccd078620b Improve error message in parser 2021-03-23 23:05:00 +00:00
gingerBill
08f7d3edbe Allow $ in polymorphic record parameter fields (but disallow mixing) 2021-03-23 22:59:10 +00:00
gingerBill
f5142aaec4 Change from test_* prefix to @(test) attribute for odin test 2021-03-14 18:43:21 +00:00
gingerBill
2aa588209e odin test to work with the new core:testing package 2021-03-14 18:01:31 +00:00
gingerBill
8cc4cba06c Add support for backslash \ to consume a newline 2021-03-14 12:53:57 +00:00