1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

472 Commits

Author SHA1 Message Date
joe-conigliaro
0aa9f5a007
all: optimize scope usage in checker & parser. store scope in ast nodes (#7281) 2020-12-12 19:01:12 +11:00
Lukas Neubert
25153490e1
fmt: keep comments after assign on same line (#7269) 2020-12-11 19:20:24 +02:00
spaceface777
ca2c082a5e
checker: initial support for evaluating expressions at compile time (#7248) 2020-12-11 04:46:06 +01:00
Daniel Däschle
0bf679a7aa
checker: correct underline for unknown type in method type (#7223) 2020-12-10 11:51:22 +02:00
Daniel Däschle
a38fe4fca9
checker: fix smartcast inside smartcast (#7215) 2020-12-10 00:59:39 +01:00
Lukas Neubert
3b6b5b8090
vfmt: properly parse comments on lines after init fields (#7202) 2020-12-09 11:11:22 +02:00
joe-conigliaro
78a6795319
all: change the way import symbols work & support consts (#7182) 2020-12-07 19:13:03 +02:00
Alexander Medvednikov
8eff8b0eff autofree: fix for args 2020-12-06 08:38:21 +01:00
Alexander Medvednikov
b6ae81032f ast: Var.is_tmp field 2020-12-06 08:19:17 +01:00
joe-conigliaro
7733834751
parser/cgen: autofree - move branch_parent_pos to cgen. 2020-12-06 18:02:36 +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
Alexander Medvednikov
0ea2fa228f autofree: fix or {}; ci: bring back gitly -autofree 2020-12-04 18:06:53 +01:00
Lukas Neubert
2691163a7e
scope: remove redundant name arg from register() (#7077) 2020-12-02 14:40:25 +01:00
joe-conigliaro
f1965c0510
ast: fmt ast.v 2020-12-01 21:20:27 +11:00
joe-conigliaro
9b583f51f1
ast: remove field which should have been removed in #34e124d 2020-12-01 20:15:35 +11:00
joe-conigliaro
34e124d5f7
cgen: auto cast sum type in array init. fixes #6907 2020-12-01 20:03:45 +11:00
joe-conigliaro
a7d917474d
checker: simplify generic fn post processing 2020-12-01 16:43:10 +11:00
Daniel Däschle
32c027a0bf
parser: disallow ptr type as sum type variant (#6996) 2020-11-28 23:40:40 +02:00
Daniel Däschle
6e4dad9acf
parser: fix position of array init (#6998) 2020-11-28 17:05:14 +02:00
Daniel Däschle
966b95ca4e
parser: move mut in if/match to expr (#6973) 2020-11-27 03:08:42 +01:00
Daniel Däschle
7d6f97259f
all: refactor UnionSumType to SumType (#6944) 2020-11-25 13:09:40 +02:00
Daniel Däschle
a042966082
all: remove old sumtype code (#6937) 2020-11-24 17:55:24 +01:00
Daniel Däschle
aa6303f0b2
all: use the new types with old syntax (#6922) 2020-11-24 13:58:29 +01:00
Daniel Däschle
96539e43b5
all: nested sum types (#6913) 2020-11-23 16:16:13 +01:00
Swastik Baranwal
650cdef8b4
checker: disallow array sum types without default field (#6892) 2020-11-21 00:07:25 +01:00
Daniel Däschle
838ad16296
all: refactor ast.Expr to use the new sum type implementation (#6792) 2020-11-21 00:05:57 +01:00
Nick Treleaven
9871d24929
fmt: fix labelled break & continue (#6889) 2020-11-20 14:12:40 +01:00
Nick Treleaven
d5242e0bf5
gen: implement labelled break and continue (retry) (#6887) 2020-11-20 12:23:48 +01:00
Lukas Neubert
ef3e8d2c84
vfmt: handle comments after type declarations (#6874) 2020-11-20 11:51:50 +02:00
Alexander Medvednikov
4328233504 Revert "gen: implement labelled break and continue (#6880)"
This reverts commit e798326a1a.
2020-11-20 02:51:35 +01:00
Nick Treleaven
e798326a1a
gen: implement labelled break and continue (#6880) 2020-11-19 21:13:15 +01:00
Daniel Däschle
9feb010355
all: mutable smartcasts (#6878) 2020-11-19 17:28:46 +01:00
Daniel Däschle
20bec81678
checker: smartcast only if type is not mut (#6841) 2020-11-15 16:53:51 +02:00
Delyan Angelov
f995aa35ea checker: add a check for x := math.sin<f64>(0) 2020-11-15 11:51:12 +02:00
Nick Treleaven
50163508f8
gen: implement type_name method for sum type instances (#6802) 2020-11-14 13:59:03 +02:00
Delyan Angelov
f42a44abec vfmt: fix match x { 10 /* ... */ {} } and a := [1/* x */, /* y */2, 3] 2020-11-11 22:59:43 +02:00
Delyan Angelov
ebfd259333 vfmt: support struct Repo <T, U> { } 2020-11-11 17:50:03 +02:00
Daniel Däschle
6271798ce3
cgen: union sum types implementation (#6745) 2020-11-11 09:18:15 +01:00
Nick Treleaven
c76e486765
parser: implement T.name for generic types (#6783) 2020-11-09 14:35:26 +01:00
Alexander Medvednikov
1c257abc23 autofree: simplify: merge tmp arg logic with scope vars 2020-11-09 14:24:46 +01:00
pancake
2994e7150f
vweb: check function and route parameter count (#6761) 2020-11-08 09:14:24 +01:00
Delyan Angelov
e80487b35c vfmt: support inline comments before fields in struct initializations 2020-11-05 18:49:52 +02:00
Delyan Angelov
35096cda3f vfmt: support comments after interface methods 2020-11-05 18:23:45 +02:00
Larpon
785bf40f67
all: remove comp time '@' expansion from scanner (#6746) 2020-11-05 10:12:32 +02:00
Delyan Angelov
9eb655e65c all: add .pos fields to all AST nodes, to avoid wrong positions in error messages 2020-11-04 13:34:12 +02:00
Delyan Angelov
70cbf56655 cgen: show more informative errors, instead of a invalid type (typ=0 idx=0) verror panic 2020-10-30 20:26:08 +02:00
Alexander Medvednikov
2c75b1397c all: struct embedding 2020-10-30 07:09:26 +01:00
Ned Palacios
ccc0cb23ed
doc: store source content, restructure module directory (#6692) 2020-10-29 17:21:37 +01:00