Daniel Däschle
9c1a5c5117
parser: fix silent parsing examples/vmod.v ( #7264 )
2020-12-11 19:14:07 +02:00
Daniel Däschle
1c56ff7faf
parser: fix fibonacci in silent mode ( #7240 )
2020-12-10 18:17:25 +02:00
Daniel Däschle
8b3ffb9be2
scanner: fix when string literal ends after } ( #7237 )
2020-12-10 17:04:12 +02:00
Daniel Däschle
032ea0f4f8
scanner: fix silent mode string parsing ( #7220 )
2020-12-09 20:09:07 +01:00
yuyi
5fa1e403ec
scanner: fix interpolation with string args ( #7214 )
2020-12-09 19:58:27 +01:00
yuyi
05a217aaf0
scanner: minor cleanup and optimization in scanner.v ( #7204 )
2020-12-09 02:09:46 +01:00
Lukas Neubert
f30faf2627
scanner: allow \e escape used for ANSI colors ( #7177 )
2020-12-07 17:21:34 +01:00
yuyi
f377710c0b
scanner: minor optimization in `text_scan()` ( #7172 )
2020-12-07 06:33:41 +01:00
Daniel Däschle
47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors ( #7119 )
2020-12-04 20:34:05 +02:00
Delyan Angelov
7a8d6a7c7b
scanner: treat warnings as errors on -W too, simillar to the parser
2020-12-04 15:11:35 +02:00
Delyan Angelov
eefdf4baa6
scanner: do not warn for \x07 in strings
2020-12-03 14:11:32 +02:00
yuyi
0b96cd50e1
scanner: fix escape `\u` ( fix #6849 ) ( #7012 )
2020-11-29 17:01:40 +02:00
yuyi
f336c2c5cc
scanner: fix error of backslash escaping x in ident_string( fix #6850 ) ( #6994 )
2020-11-29 00:39:45 +02:00
Delyan Angelov
e6116c47be
scanner: guarantee an early exit when the parser/scanner is stuck
2020-11-27 12:44:39 +02:00
yuyi
636efb3c20
cgen: fix windows escape errors for comptime @ pseudo vars ( #6977 )
2020-11-27 11:16:57 +02:00
Alexander Medvednikov
9b0c96d792
scanner: allow \r after $
2020-11-27 03:27:34 +01:00
Alexander Medvednikov
c27818e247
all: remove remaining broken escape sequences
2020-11-27 03:17:19 +01:00
Alexander Medvednikov
62ee436944
all: remove broken escape sequences after $ in strings
2020-11-27 03:07:37 +01:00
Ned Palacios
b957c64905
scanner: store errors and warnings on silent mode ( #6883 )
2020-11-20 11:44:19 +02:00
Delyan Angelov
7d472d887e
scanner: vfmt scanner.v
2020-11-11 17:25:58 +02:00
Delyan Angelov
8c241cb745
checker: check that fns with return values, and matches, do return
2020-11-11 17:23:57 +02:00
Larpon
4051ce869c
all: remove unused enum value and improve error message for `@` tokens in scanner ( #6751 )
2020-11-05 12:59:49 +02:00
Larpon
785bf40f67
all: remove comp time '@' expansion from scanner ( #6746 )
2020-11-05 10:12:32 +02:00
Enzo
b083f4014b
fmt: fix multiple things and format most of the compiler ( #6631 )
...
Format expressions inside string interpolation like the rest (it used to be a+b instead of a + b, not too sure why)
Fix formatting some match branches when there were only one statement inside (it was inlined)
Fix parsing and formatting some comments edge case on struct field init. You should check out this test because the result is a bit different from before. I personally find it more logical but I would understand if the former format was to stay
Fix formatting of void-returning function signature
2020-10-15 22:12:59 +02:00
Alexander Medvednikov
982056894e
fmt: use `f(x int, y int)` instead of `f(x, y int)`
2020-10-15 12:00:46 +02:00
Delyan Angelov
8e5067421f
vet: accumulate the collected errors manually (fixes CI)
2020-10-06 10:02:35 +03:00
Alexander Medvednikov
256a572cbe
vet: fix vet_errors
2020-10-06 07:07:50 +02:00
Alexander Medvednikov
63c9b88e7f
vet: remove unnecessary &[]string
2020-10-06 06:43:28 +02:00
Henrixounez
0f1ed1ca09
scanner: add an error for unfinished string literals ( #6519 )
2020-10-01 16:40:59 +03:00
Alexander Medvednikov
624f22e27e
all: mutability check (part 1); enable mutable sumtype args
2020-09-22 05:28:29 +02:00
Swastik Baranwal
077b597bd8
scanner/parser: change error msgs for `\0` and `\x00` and add error for r`byte` and c`byte` ( #6436 )
2020-09-21 17:34:24 +03:00
Swastik Baranwal
1c886ad067
scanner: add check for `!is_raw` for null `\0` ( #6427 )
2020-09-19 19:09:18 +03:00
Henrixounez
99574e465d
scanner: allow escape on null character ( #6404 )
2020-09-18 01:02:06 +02:00
Daniel Däschle
3a146a6dbe
checker: fix error pos on default value ( #6338 )
2020-09-09 15:34:41 +02:00
Delyan Angelov
47f59d3fb6
v.scanner: fix error line numbers when comments end with CRLF
2020-08-26 11:39:32 +03:00
Nick Treleaven
98c39a37c0
scanner: warn about interpolation for `$f(expr)` ( #6179 )
2020-08-22 05:48:06 +02:00
Uwe Krüger
9a5f040f72
all: handle `<-` arrow token for channel operations ( #6152 )
2020-08-17 20:12:00 +02:00
Delyan Angelov
36eae1c175
builtin: x.vstring() instead of string(x) ( #6102 )
2020-08-10 18:05:26 +02:00
Maciej Michalec
449c98e861
scanner: floats without fraction ( fix #5262 ) ( #6064 )
2020-08-05 05:11:29 +02:00
Swastik Baranwal
8b66816bdc
scanner: more checks for `_` as num_sep ( #5992 )
2020-07-28 16:09:19 +10:00
Delyan Angelov
a552674254
vvet: fix segfault on `v vet .`
2020-07-25 15:57:57 +03:00
Alexander Medvednikov
632e27a4a9
all: fix a big mutability bug and update all mutable vars
2020-07-23 23:16:36 +02:00
Enzo
8a855ccae1
fmt,vet: handle `var in [single_value]` ( #5882 )
2020-07-19 19:58:34 +02:00
Swastik Baranwal
f3a505b558
scanner: add check for `_` in num literals ( #5849 )
2020-07-16 17:29:07 +03:00
Delyan Angelov
c891014c77
scanner: reduce memory, increase speed for long commented sections
2020-07-11 21:27:39 +03:00
Delyan Angelov
022cc72740
scanner: parse multiple comments and long strings without a stackoverflow
2020-07-11 20:52:08 +03:00
Alexander Medvednikov
2a696cb837
vet: prohibit spaces before `)`
2020-07-11 12:14:19 +02:00
Alexander Medvednikov
549d7a487d
tests: fix scanner_test.v
2020-07-11 11:51:58 +02:00
Alexander Medvednikov
d4d552fb00
vet: prohibit spaces after `(`
2020-07-11 11:41:39 +02:00
Delyan Angelov
2fb5c91f4d
scanner: remove error check for embedded \x00 chars in c'literals'
2020-07-10 21:42:03 +03:00
Delyan Angelov
d2a2db7bff
vfmt: format scanner.v
2020-07-04 16:14:30 +03:00
Uwe Krüger
6c022db786
scanner: fix string interpolation for '$a.b().c' ( #5612 )
2020-07-02 00:02:59 +02:00
yuyi
2f614ad79f
parser: optimize cross assign using expr.str() ( #5604 )
2020-07-01 16:43:13 +02:00
yuyi
6c5b638202
parser: fix array cross assign ( fix #5577 ) ( #5591 )
2020-07-01 12:11:03 +02:00
Delyan Angelov
78e1127d99
cgen: treat the main module like any other v module
2020-07-01 00:53:53 +02:00
Delyan Angelov
fcd73bcb63
scanner: ignore CR signs in string literals
2020-06-23 21:10:58 +03:00
Uwe Krüger
3b6e66db0d
fmt: further fixes for string interpolation and builtin macros
2020-06-18 18:48:23 +02:00
Adam Stankiewicz
b3fc462a78
scanner: fix parsing multiple .amp
2020-06-13 00:01:44 +02:00
Delyan Angelov
8d3f680d07
vdoc: implement .toplevel_comments parsing mode
2020-06-06 19:05:26 +03:00
joe-conigliaro
34af7ccba9
scanner: cut keyword lookups in half
2020-06-06 19:49:50 +10:00
Alexander Medvednikov
fb3e52ca63
all: `!is` operator
2020-06-02 16:18:12 +02:00
Delyan Angelov
ae8f7cf569
tests: fix some tests, that failed due to the stricter immutable checks
2020-06-01 18:24:38 +03:00
Delyan Angelov
86862d6a94
checker: remove mod_file_cacher exception
2020-06-01 17:43:03 +03:00
Delyan Angelov
75b8822f06
scanner: prevent infinite looping, when reaching .eof due to parser bugs
2020-05-28 19:22:11 +03:00
Delyan Angelov
f6bdb3ae81
v.vmod: cleanup vmod.mod_file_cacher API
2020-05-28 01:38:11 +03:00
Larpon
6ca53d7b39
scanner: improve @FN substitution for anon functions
2020-05-27 12:05:50 +03:00
Uwe Krüger
013fdb8a4b
checker: restrict numeric promotions to cases where no data is lost
2020-05-27 05:42:48 +02:00
yuyi
23c0bb600c
scanner: fix vmod_file on windows
2020-05-27 03:32:39 +02:00
Delyan Angelov
3cfdd2a4cd
scanner: add support for @VMOD_FILE
2020-05-26 23:39:15 +03:00
Larpon
31ba64b409
scanner: add support for `@STRUCT` compile time substitution
2020-05-26 15:35:11 +02:00
Delyan Angelov
b0cfd3fa67
parser: reimplement [flag] enum support. Add p.vcodegen too
2020-05-26 00:00:48 +03:00
Larpon
09dc2eed82
scanner: add support for '@MOD'
2020-05-25 19:33:41 +03:00
Ruofan XU
b2b0461218
scanner: fix err pos related to num literal
2020-05-21 18:43:57 +02:00
Ruofan XU
aba09a7e4d
scanner: fix err pos related to num literals
2020-05-21 16:20:36 +03:00
Delyan Angelov
ac396ea02f
http: cleanup backend_nix.c.v, fixes vpm too
2020-05-20 12:04:28 +03:00
yuyi
7f4cf08516
parser: check `(mut f Foo)` syntax
2020-05-17 13:51:18 +02:00
Larpon
aa30549337
scanner: fill out '@FN' placeholder at compile time while scanning
2020-05-16 14:20:19 +02:00
yuyi
b1511ce995
parser: optimize no main file process
2020-05-13 14:02:04 +02:00
eyelash
72dfe11fa5
scanner: add a colon to error messages ( #4818 )
2020-05-10 16:29:15 +02:00
Alexander Medvednikov
c64f8b0d1f
parser/checker: pub: struct fields
2020-05-09 15:16:48 +02:00
yuyi
e0e064ff08
scanner: fix string slash line breaks error
2020-05-04 10:19:23 +02:00
Delyan Angelov
0b750a234f
repl: fix for single lines ending with // comment
2020-05-03 20:48:46 +03:00
yuyi
de272654f1
repl: fix import xxx with no fn main error
2020-05-01 18:12:18 +02:00
Enzo Baldisserri
50491670af
fmt: fix formatting backtick char literal
2020-04-30 09:33:43 +02:00
Henrixounez
0dc7a57e1f
scanner: prevent panic with string starting on first character
2020-04-28 18:57:16 +02:00
Delyan Angelov
e67bf674e3
scanner: cleanup, only v.parser now depends on v.scanner
2020-04-27 16:08:04 +03:00
yuyi
2574dce174
all: fix remaining `[]array` warnings
2020-04-26 16:25:54 +02:00
Alexander Medvednikov
a48080afec
parser: deprecate import(); replace remaining import()s
2020-04-26 07:36:02 +02:00
yuyi
541b058e90
all: use `a !in b` instead of `!(a in b)`
2020-04-26 06:39:23 +02:00
Ruofan XU
b0e498bf0b
scanner: refactor ident_dec_number
2020-04-18 17:49:27 +02:00
Daniel Däschle
1a4113d245
checker: store errors in []Error
2020-04-13 01:56:01 +02:00
Ned Palacios
db2c656da8
scanner: `!in` token
2020-04-12 07:30:26 +02:00
Alexander Medvednikov
581d836de6
!in operator
2020-04-11 21:31:54 +02:00
yuyi
c1aba95d7d
parser: refactor script & repl handling
2020-04-11 15:06:26 +03:00
Alexander Medvednikov
053de0b8e3
checker: check variable mutability
2020-04-11 04:09:41 +02:00
Daniel Däschle
32550c6d69
scanner: even better error messages
2020-04-10 00:09:34 +02:00
Delyan Angelov
ef19aa1de6
assert: fix line position, pretty print float literals and casts
2020-04-08 05:47:29 +03:00
Daniel Däschle
fe0942043c
checker: check if BranchStmt is in a loop
2020-04-07 12:29:11 +02:00
Delyan Angelov
3b3d248637
scanner: use formatted errors for s.error too
2020-04-06 19:58:32 +03:00
Delyan Angelov
7a99949f0e
errors: print more informative and pretty errors
2020-04-06 19:40:20 +03:00