Commit Graph

223 Commits

Author SHA1 Message Date
gingerBill
ce08e832f7 Allow ..= alongside .. as a "full range" operator; Update core:odin/parser etc 2021-05-16 12:34:35 +01:00
gingerBill
7886798156 Add space 2021-05-15 19:49:48 +01:00
gingerBill
0ad599675e Improve semicolon insertion rule for dummy tokens ++ and -- 2021-05-15 19:47:00 +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
Gitea
011c8d5cda fix Syntax Warning 2021-04-09 13:03:01 +03:00
gingerBill
54e6c50769 Implement f16 functionality 2021-04-01 10:06:00 +01:00
gingerBill
8cc4cba06c Add support for backslash \ to consume a newline 2021-03-14 12:53:57 +00:00
gingerBill
15dbc99cb9 Minimize TokenPos size by using i32 for line/column/offset and file_id instead of String
To make `i32` safe, the parser limits the file size of odin files to a maximum of 2GiB (which will be good enough for the vast vast majority of cases)
2021-03-04 16:45:30 +00:00
gingerBill
28f279329d Remove bit_field keyword and parsing logic 2021-02-23 15:29:54 +00:00
gingerBill
01313eec7f Add flags -ignore-warnings and -warnings-as-errors 2021-02-23 14:59:28 +00:00
gingerBill
a652c24ac3 Remove opaque keyboard 2021-02-23 13:02:18 +00:00
gingerBill
53d8ec4d15 Add extra error checks 2021-01-18 11:34:09 +00:00
gingerBill
98c8fde098 Remove unused tokens 2020-12-06 13:17:48 +00:00
gingerBill
f0683c9102 Merge branch 'master' into parser-experiments 2020-12-06 00:49:48 +00:00
gingerBill
2a232f2397 Remove the (reserved) keyword macro 2020-12-04 16:14:11 +00:00
gingerBill
b6bbe29c8f Remove const as a (reserved) keyword 2020-12-04 16:04:58 +00:00
gingerBill
54fbdabc38 Add experimental -insert-semicolon functionality to tokenizer and parser 2020-11-01 15:10:06 +00:00
gingerBill
4629754f7c Inline asm expression (-llvm-api)
See https://llvm.org/docs/LangRef.html#inline-assembler-expressions
Example:
```
x := asm(i32) -> i32 {
    "bswap $0",
    "=r,r",
}(123);
```
Allowed directives `#side_effect`, `#align_stack`, `#att`, `#intel` e.g. `asm() #side_effect #intel {...}`
2020-10-24 16:32:37 +01:00
gingerBill
ca818fb857 Remove comments containing unicode characters from tokenizer 2020-07-14 23:51:46 +01:00
gingerBill
3d4a3730b0 Add notin deprecation 2020-05-27 18:47:45 +01:00
gingerBill
1f31d573e4 Fix tokenization 2020-05-27 18:43:02 +01:00
gingerBill
237962182b Fix tokenizing for %% 2020-05-27 18:41:10 +01:00
gingerBill
1a0614b0d7 Improve performance of tokenization and parsing 2020-05-27 18:23:37 +01:00
gingerBill
876820789e Add rune_is_letter_or_digit for tokenizer 2020-05-27 12:54:11 +01:00
gingerBill
4e21a4d46a Optimize rune_is_* procedures for tokenizer 2020-05-27 12:43:49 +01:00
gingerBill
6ac0fb80a6 Minor tokenizer performance improvements 2020-05-27 12:32:11 +01:00
gingerBill
d6bcc25b69 Fix tokenizer for 0i #658 2020-05-24 21:43:36 +01:00
gingerBill
ef539696b9 Strip carriage return \r from raw string literals 2020-05-23 11:39:29 +01:00
gingerBill
86b613fb15 Remove the need for type_of, size_of, align_of, offset_of to be keywords 2020-05-22 12:32:29 +01:00
gingerBill
b13423d7f7 Global variable initialization support 2020-02-23 16:25:11 +00:00
gingerBill
7d9600b740 Ternary Expr; lbAddr extra; Phi node support 2020-02-06 23:33:41 +00:00
gingerBill
159150c6d9 Allow not_in as keyword over notin, but still allow notin to work 2020-01-16 10:00:14 +00:00
gingerBill
9db81498d8 Make the string type elements "immutable", akin to char const * in C
Allows for extra security and optimization benefits
2019-12-01 14:10:59 +00:00
gingerBill
b53fe14c22 Change error to syntax_error in parser 2019-10-13 16:06:41 +01:00
gingerBill
b9d3129fb3 where clauses for procedure literals 2019-08-31 20:13:28 +01:00
gingerBill
6d3feb4531 Fix typo in tokenizer (no actual bug) 2019-08-26 16:18:26 +01:00
gingerBill
7bc146e6fd Built-in Quaternions (Not just an April Fool's Joke any more) 2019-08-26 11:33:05 +01:00
gingerBill
9cadd58465 Improve tokenizer slightly 2019-05-28 14:44:32 +01:00
gingerBill
222941727f Add ..< operator for ranges; Add extra checking for bit set assignments 2019-05-28 12:45:20 +01:00
gingerBill
458ec5922e odin query
Output .json file containing information about the program
2019-05-25 20:24:19 +01:00
gingerBill
ab0afa548b Fix ||= and &&= 2019-05-06 11:32:35 +01:00
gingerBill
ecd2eacd75 Remove dead keywords; Fix min and max for enum types 2019-03-31 22:35:05 +01:00
gingerBill
2ada90e094 Improve a tokenizer error message; Add extra tokens for in and notin for fun! 2019-03-24 19:12:41 +00:00
gingerBill
1eaa47ebae Fix using import behaviour - #352 2019-03-17 13:03:39 +00:00
gingerBill
a0c81c79ad Fix bugs: Array Literals with constant elements; IR printing of raw procedure types 2019-02-24 10:30:58 +00:00
gingerBill
a9ab90bd24 Make static an attribute rather than a keyword prefix 2019-02-23 22:17:27 +00:00
gingerBill
e551d2b25e Replace foreign export {} with @export 2019-02-23 21:39:47 +00:00
gingerBill
a240a3d146 static variable declarations (Experimental) 2018-12-28 13:31:06 +00:00
gingerBill
eb5af2876a Support #[...] as an alternative attribute syntax
(Experimentation between `@()` and `#[]`)
2018-12-26 12:19:12 +00:00
gingerBill
1f2fdddc6d Support #! comments 2018-12-26 12:00:16 +00:00