Commit Graph

113 Commits (849cde245c93855248101c1b636e847a85e79224)

Author SHA1 Message Date
Delyan Angelov 849cde245c
v: support dump(expr) (#9160) 2021-03-06 18:09:28 +01:00
spaceface b9a381f101
all: migrate to the new Option (p. 1) (#8924) 2021-02-28 22:24:29 +03:00
yuyi 524372d49c
parser: fix incorrect comments of expr() (#8979) 2021-02-26 09:21:58 +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
Lukas Neubert 51125541c7
parser: fix weird minus after comment parse error in arrays (#8912) 2021-02-23 09:51:00 +02:00
Uwe Krüger 5306b2788c
all: extend `wait()` method to array of `thread` handles (#8840) 2021-02-22 15:08:52 +02:00
yuyi a119affeba
cgen: check unknown sizeof type (#8815) 2021-02-18 09:38:57 +02:00
Delyan Angelov 843de10442
parser,gen: fix `arr << map[key] using map_get_and_set_1, leading to double free 2021-02-16 16:39:31 +02:00
Nick Treleaven d37fb5641f
parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
Lukas Neubert cb1f63f765
parser: replace eat_line_end_comments() with configurable eat_comments() (#8636) 2021-02-08 18:16:02 +02:00
Nick Treleaven e2ff2a5405
parser: deprecate `{var |` struct update (#8618) 2021-02-08 17:03:05 +02:00
Nick Treleaven ff1aa06455
parser: require ++/-- to be on the same line as the previous token (#8621) 2021-02-07 23:10:16 +01:00
Nick Treleaven cd4f7101f7
parser: support short struct update syntax `{...ident,` (#8613) 2021-02-07 03:43:51 +01:00
Nick Treleaven b92f980274
token: fix Token.str() for punctuation and operators (#8610) 2021-02-07 03:40:00 +01:00
Nick Treleaven f5f65f929f
parser: parse `map{key_expr: val_expr}` (#8608) 2021-02-06 22:13:24 +01:00
zakuro 6b776e686e
parser: display correct position on boolean expression error (#8563) 2021-02-05 16:52:35 +01:00
div72 8c70920695
all: add offsetof (#8380) 2021-01-30 12:57:09 +01:00
Uwe Krüger 815104e5d0
parser: parse `-1` and `-13.3` as number literals (#8321) 2021-01-24 22:09:51 +01:00
Uwe Krüger 1ea5cedd03
parser/cgen: fix explicit array/map shared/reference initializers (#8307) 2021-01-23 23:54:57 +02:00
Lukas Neubert 8b61891348
fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
Daniel Däschle dbf84520f1
all: update assoc syntax (#8274) 2021-01-22 23:24:48 +01:00
Daniel Däschle 500ebf77e4
all: implement multiple generics (#8231) 2021-01-22 13:49:56 +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
Nick Treleaven 8ee67d1c1c
parser: disallow indexing on next line at top-level (#8128) 2021-01-17 05:30:41 +01:00
Daniel Däschle 53941c4a0a
fmt: fix if cond break readability (#8132) 2021-01-16 02:12:17 +01:00
Larpon f73500f2fe
all: add support for the `x := $embed_file('v.png')` compile time call (#8048) 2021-01-14 16:20:11 +02:00
Nick Treleaven ac85257ea0
parser: fix sizeof(mod.Type), fix checking sizeof expression (#8065) 2021-01-13 06:13:39 +01:00
Larpon 8f315d226b
vvet: move to own subdir, prepare richer suggestions (#7989) 2021-01-09 16:11:49 +02:00
Swastik Baranwal 9291fb5e0c
checker: disallow comparison between enum and int (#7886) 2021-01-08 17:41:52 +01:00
Nick Treleaven cbefe6c32f
parser: warn about old use of `typeof` (#7923) 2021-01-07 20:32:02 +01:00
Uwe Krüger ffd753abdc
all: implement `ch <- x or {...}` and `ch <- x ?` (#7928) 2021-01-06 21:19:40 +01:00
Daniel Däschle 9025c3528f
all: implement comptime if for generic type `$if T is string {` (#7901) 2021-01-06 19:58:53 +02:00
Nick Treleaven b9c6011602
parser: support casting to a pointer to array (#7861) 2021-01-04 18:22:04 +02:00
Nick Treleaven 9243e06dba
parser: allow integer and rune keys for map literal (#7756) 2021-01-01 17:23:32 +01:00
Nick Treleaven d15d13674c
parser: parse non-identifier expressions for sizeof too (#7781) 2021-01-01 15:38:11 +02:00
Lukas Neubert 2360762a42
fmt: fix unexpected `comment`, expecting struct key for trailing arg syntax (#7658) 2020-12-28 20:26:24 +02:00
Lukas Neubert 06fdf34214
fmt: unwrap long single line ifs (#7608) 2020-12-27 14:20:30 +01:00
yuyi 1558bd1658
parser: minor optimization of `expr()` (#7575) 2020-12-26 12:22:06 +02:00
Lukas Neubert 8cd74df2f3
vfmt: keep UnsafeExpr linebreacks as set by developer (#7558) 2020-12-25 16:52:16 +02:00
Ned Palacios 06369a27c2
parser: return incomplete selector expr stmt (#7465) 2020-12-22 13:00:23 +01:00
Uwe Krüger 8278af4ee8
parser: hot fix to handle `x = <-ch[i] or { }` (#7416) 2020-12-19 22:44:16 +02:00
Alexander Medvednikov 1f74f83bc6 parser: map or block; checker: require ref field init 2020-12-19 10:28:17 +01:00
yuyi 8ab59c5f0f
parser: implement a direct call to an array of functions (fix #6908) (#7322) 2020-12-15 04:24:57 +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
Daniel Däschle 47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors (#7119) 2020-12-04 20:34:05 +02:00
Daniel Däschle 6c100a0bc3
vls,parser: fix an eof error in parsing invalid const declarations (#7115) 2020-12-03 21:11:43 +02:00
Lukas Neubert 2691163a7e
scope: remove redundant name arg from register() (#7077) 2020-12-02 14:40:25 +01:00
Nick Treleaven 6da6a082c7
parser: fix showing error position for pratt.v (#6997) 2020-11-28 23:39:45 +02:00
Daniel Däschle 18cf36a22c
parser: remove unnecessary match as code (#6972) 2020-11-27 22:25:08 +02:00