Commit Graph

45 Commits (870ed86afc4023d46ca2433285de20b4c2e5d088)

Author SHA1 Message Date
yuyi 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Wertzui123 ea6d2d53db
parser: disallow `for mut in range` (fix #12234) (#12277) 2021-10-27 14:55:36 +03:00
Uwe Krüger 3c0a368af3
all: automatically move (some) referenced objects to heap (#9873) 2021-04-25 21:40:38 +03:00
Alexander Medvednikov 7385f8e56b all: a massive merge of ast and table modules 2021-04-02 01:57:09 +03:00
Alexander Medvednikov 6f318be96c checker: do not allow nil sum types init 2021-03-31 11:13:52 +03:00
Ned Palacios b319068151
ast, parser: implement simple AST poisoning (#9525) 2021-03-30 09:33:29 +02:00
Delyan Angelov 1c0eefae38
parser/scanner: replace p.peek_tok2/3 with p.peek_token(2/3) (#8946) 2021-02-24 21:03:53 +03:00
yuyi 05a08530ff
cgen: implement for_stmt of multi_init_vars or multi_assign_vars (#8917) 2021-02-24 14:58:45 +02:00
yuyi 3164e29651
all: fix fn_or_for_in mut value (part 1) (#8671) 2021-02-12 02:03:11 +02:00
Lukas Neubert 8b61891348
fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
yuyi f399c17e3d
parser: check for_in mut key (#8235) 2021-01-21 12:46:15 +01:00
Tim Basel 129eee346b
fmt: keep single empty lines (#8189) 2021-01-19 14:49:40 +01:00
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Daniel Däschle 53941c4a0a
fmt: fix if cond break readability (#8132) 2021-01-16 02:12:17 +01:00
Daniel Däschle 88d18f3303
checker: smartcast in for loops (#7942) 2021-01-07 21:35:32 +01:00
Alexander Medvednikov 0d43ff2453 parser: fix `for i, mut val in vals {; examples: vfmt flappybird 2020-12-27 12:02:18 +01:00
Lukas Neubert d1fc65c260
parser: add information about the ending line for a few elements (#7414) 2020-12-22 14:45:12 +01:00
joe-conigliaro 0aa9f5a007
all: optimize scope usage in checker & parser. store scope in ast nodes (#7281) 2020-12-12 19:01:12 +11:00
Alexander Medvednikov 8eff8b0eff autofree: fix `for` args 2020-12-06 08:38:21 +01:00
joe-conigliaro 7733834751
parser/cgen: autofree - move branch_parent_pos to cgen. 2020-12-06 18:02:36 +11:00
joe-conigliaro d7c057840a
parser: autofree - reset p.branch_parent_pos to previous pos on return 2020-12-06 17:00:44 +11:00
Delyan Angelov 946a1418fe
Revert "autofree: handle tmp vars in for loops"
This reverts commit 1d6c604664.
2020-12-05 21:52:50 +02:00
Alexander Medvednikov 1d6c604664 autofree: handle tmp vars in for loops 2020-12-05 20:11:31 +01:00
joe-conigliaro 83f651c29a
cgen: autofree - know where to stop freeing parent scops on continue/break 2020-12-06 02:36:27 +11:00
Daniel Däschle 47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors (#7119) 2020-12-04 20:34:05 +02:00
Lukas Neubert 2691163a7e
scope: remove redundant name arg from register() (#7077) 2020-12-02 14:40:25 +01:00
Alexander Medvednikov a07f31feae all: `for mut val in vals {` (part 1) 2020-10-13 16:27:30 +02:00
Swastik Baranwal 7e13518cc2
parser: disallow match expr at certain places (#6490) 2020-10-03 16:30:58 +03:00
Nick Treleaven 3925c3fa20
parser: disallow index variable with range `for` (#6464) 2020-09-24 15:52:44 +03:00
Lukas Neubert fa03f390b3
parser: add error for `for i := 0; i++; i < ..` (#5850) 2020-07-17 10:31:58 +03:00
Alexander Medvednikov 9a77c0ab81 parser: fix the for loop check 2020-06-24 16:58:11 +02:00
Alexander Medvednikov 8ac00b8711 parser: check for loop key/val names 2020-06-24 16:54:21 +02:00
joe-conigliaro d478b44915
parser/checker/gen: merge AssignExpr & AssignStmt into just AssignStmt 2020-06-16 21:20:16 +10:00
Delyan Angelov 5d0cc0944e parser: fix v_panic due to -pos in unused var warning (with tcc) 2020-05-15 20:11:27 +03:00
yuyi 6d0b791ac8
parser: warning about unused imports 2020-05-14 17:14:24 +02:00
yuyi 2f52106253
parser: use .next instead of .check, when a token is already known 2020-05-07 07:51:36 +03:00
Alexander Medvednikov 9971c58ca3 all: remove `var` key 2020-04-30 16:55:33 +02:00
joe-conigliaro 9f76a7b250
parser: simplify unused vars & add loop/if vars etc 2020-04-27 23:16:31 +10:00
Delyan Angelov 8b5573a6f3 errors: use more distinct and detailed name redefinition messages 2020-04-23 13:15:01 +03:00
Kris Cherven d871595437
all: replace `var` with `mut` 2020-04-23 01:16:58 +02:00
Kris Cherven 5c3742fbd2
parser: check var names in for loops 2020-04-22 03:48:51 +02:00
Kris Cherven 155891a4e0
parser: add unused variable warning 2020-04-22 01:52:56 +02:00
Kris Cherven 95ae915c0c
checker/parser: fix outdated error messages 2020-04-19 20:46:48 +02:00
Alexander Medvednikov 59baef89a0 parser: assign.v, containers.v, for.v, if.v 2020-04-17 18:16:55 +02:00