Commit Graph

131 Commits (d24dce8eb33d60395e8dd8326bbfd0e81a0bcf7b)

Author SHA1 Message Date
StunxFS d24dce8eb3
parser,checker: support `$compile_error('message')` and `$compile_warn('message')` (#14320) 2022-05-09 08:18:26 +03:00
Joe Conigliaro 8dc2601080
all: comptime_call - simplify tmpl scoping, solves many issues. 2022-04-08 17:33:24 +10:00
yuyi f7feb634d2
checker: fix error for if mut with immutable variable (#13728) 2022-03-13 16:33:50 +02:00
Joe Conigliaro 3b6e122d9d
all: comptime_call - update tmpl scope vars with caller scope vars after their properties got updated in checker 2022-03-01 02:13:29 +11:00
playX b842e89acc
all: initial implementation of compile-time types (#13549) 2022-02-21 17:42:54 +02:00
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
yuyi e433badcb8
parser, cgen: fix multiple comptime tmpl in one function (#12757) 2021-12-08 11:12:02 +03:00
yuyi c29a3cf6e8
parser: fix (absolute path) error (#12747) 2021-12-07 11:33:53 +02:00
Leo Developer ace63594bf
all: support `$embed_file('embed.vv', .zlib)` (#12654) 2021-12-04 19:43:19 +02:00
Leo Developer 0f59d88ba6
v.embedfile: make path public (#12614) 2021-11-29 16:32:42 +02:00
Delyan Angelov d431145a39
v.util,tools: use os.join_path_single 2021-11-22 21:42:55 +02:00
yuyi 5a89c0a480
ast: change CompFor to ComptimeFor (#12482) 2021-11-17 08:29:43 +02:00
yuyi c28041cecc
all: cleanup/rename all `comp_` names to be `comptime_` (#12467) 2021-11-15 15:47:29 +02:00
yuyi 187c1c160b
parser: minor cleanup in comp_call() (#11311) 2021-08-26 07:57:10 +03:00
yuyi a5c784830b
all: simplify global_scope processing (#10848) 2021-07-18 15:29:34 +03:00
Louis Schmieder eb96ad11d9
checker: add pkgconfig to comptime if (#10692) 2021-07-09 18:17:04 +03:00
Delyan Angelov bc01de2181
ast: mark ast.File{} with `[heap]`, and use []&ast.File consistently 2021-05-22 19:06:55 +03:00
Louis Schmieder 23513ae35c
v.parser: fix vfmt eating the file name in `$tmpl('non_existant_file')` (#10056) 2021-05-08 21:11:13 +03:00
Louis Schmieder fc3b628440
v: support `$for attr in Test.attributes` (#9836) 2021-04-25 18:29:26 +03:00
Delyan Angelov d4f31412b7
v: deprecate `@VROOT` in favour of `@VMODROOT` (#9795) 2021-04-19 19:01:47 +03:00
Lukas Neubert a0648a3ec2
all: fixes related to Node.pos (#9613) 2021-04-06 15:16:19 +02:00
Alexander Medvednikov 7385f8e56b all: a massive merge of ast and table modules 2021-04-02 01:57:09 +03:00
Delyan Angelov a00c80b98f
v: support compiler notices. Use them for `[deprecated_after: '2021-05-01']` tags
Compiler notices are like warnings, with these differences:
   a) notices use a different color.
   b) notices use a different label.
   c) notices do not prevent compilation with -prod.
   (warnings are converted to errors with -prod)
2021-03-22 19:59:00 +02:00
Anton Zavodchikov 1ad4623fb8
tmpl: move to v/parser (#9052) 2021-03-15 13:35:55 +02:00
Miccah f26d2f02b7
ast, cgen, checker, parser: support method arguments in comptime $for (#9208) 2021-03-11 15:04:34 +02:00
Lukas Neubert 460e06b9ff
fmt: do not insert a newline before returned $vweb.html() (#9063) 2021-03-03 10:14:05 +02:00
Anton Zavodchikov 506041a15b
tmpl: fix doubling templates folder path and enhancements (#9029) 2021-03-01 11:15:59 +02:00
Nick Treleaven 4ad95cfeaf
checker: check types with $for/$if introspection (#8984) 2021-02-26 15:26:50 +01:00
Nick Treleaven 59d4d0ef1d
checker: detect unknown type to iterate with $for (#8971) 2021-02-26 08:28:19 +02:00
kristof de spiegeleer 3f3bec45fa
examples: add a template example, update the regex examples (#8829) 2021-02-19 12:39:15 +02:00
Delyan Angelov 25a3873019
parser,checker: support @METHOD, replaced by 'ReceiverType.MethodName' 2021-02-05 16:32:43 +02:00
Larpon d25825df57
all: support compile time `$env('ENV_VAR')` (#8456) 2021-01-31 19:22:42 +02:00
Nick Treleaven f992099726
checker: check s.$method(arg) argument is []string (#8455) 2021-01-31 15:28:23 +01:00
Nick Treleaven 43c3a3b080
checker: fix compile-time call with string identifier expression (#8415) 2021-01-30 15:24:16 +01:00
Nick Treleaven c0685eeefc
parser: add warning for s.$field.name without brackets (#8411) 2021-01-30 12:56:10 +01:00
Lukas Neubert e47c13903b
fmt: keep newlines between toplevel stmts (#8383) 2021-01-29 12:17:59 +02:00
Delyan Angelov 728344ff65
ci: fix `v test-cleancode` 2021-01-25 12:55:01 +02:00
Delyan Angelov d4f6f5eec4
sokol,fontstash: move f_d_use_freetype.v to vlib/fontstash/a_d_use_freetype.v 2021-01-23 11:39:17 +02:00
Louis Schmieder 4045ec1ca8
checker: remove vweb unused vars (#8180) 2021-01-21 11:09:19 +01:00
Delyan Angelov 7037965973
parser: cleanup unused `p.os_from_string` 2021-01-19 08:33:03 +02:00
Delyan Angelov f375418847
parser: remove forgotten eprintln statement 2021-01-18 14:57:10 +02:00
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Alexander Medvednikov a008c8254c parser: comptime: update tmpl_path 2021-01-17 06:42:21 +01:00
Alexander Medvednikov ac8a7ac901 parser: bootstrap the new struct init check 2021-01-17 06:30:30 +01:00
Alexander Medvednikov 2b058edc98 checker: do not require ref field init with update expr 2021-01-17 06:24:03 +01:00
Delyan Angelov 5ae55731b9
embed: move to `v.embed_file`, fix CI failing test 2021-01-16 20:03:07 +02: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
Daniel Däschle 5841d5d8e1
all: implement basic comptime field selector (#7888) 2021-01-05 16:11:43 +02:00
spaceface c544cc508b
pref: fix cross-compiling graphical apps to Windows (#7449) 2020-12-21 19:45:12 +02:00