mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.scanner: fix position of hash statements (#9222)
This commit is contained in:
parent
141a6db16b
commit
6a7ef4f5b2
@ -1,3 +1,3 @@
|
||||
vlib/v/checker/tests/comptime_env/env_parser_errors_1.vv:1:3: error: supply an env variable name like HOME, PATH or USER
|
||||
vlib/v/checker/tests/comptime_env/env_parser_errors_1.vv:1:1: error: supply an env variable name like HOME, PATH or USER
|
||||
1 | #flag -I $env('')/xyz
|
||||
| ~~~~~~~~~~~~~~~~~~~
|
||||
| ~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,3 +1,3 @@
|
||||
vlib/v/checker/tests/comptime_env/env_parser_errors_2.vv:1:3: error: cannot use string interpolation in compile time $env() expression
|
||||
vlib/v/checker/tests/comptime_env/env_parser_errors_2.vv:1:1: error: cannot use string interpolation in compile time $env() expression
|
||||
1 | #flag -I $env('$ABC')/xyz
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,3 +1,3 @@
|
||||
vlib/v/checker/tests/comptime_env/env_parser_errors_3.vv:1:3: error: no "$env('...')" could be found in "-I $env()/xyz".
|
||||
vlib/v/checker/tests/comptime_env/env_parser_errors_3.vv:1:1: error: no "$env('...')" could be found in "-I $env()/xyz".
|
||||
1 | #flag -I $env()/xyz
|
||||
| ~~~~~~~~~~~~~~~~~
|
||||
| ~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,11 +1,11 @@
|
||||
vlib/v/checker/tests/comptime_env/using_comptime_env.vv:1:3: error: the environment variable "VAR" does not exist.
|
||||
vlib/v/checker/tests/comptime_env/using_comptime_env.vv:1:1: error: the environment variable "VAR" does not exist.
|
||||
1 | #flag -I $env('VAR')/xyz
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2 | #include "$env('VAR')/stdio.h"
|
||||
3 |
|
||||
vlib/v/checker/tests/comptime_env/using_comptime_env.vv:2:3: error: the environment variable "VAR" does not exist.
|
||||
vlib/v/checker/tests/comptime_env/using_comptime_env.vv:2:1: error: the environment variable "VAR" does not exist.
|
||||
1 | #flag -I $env('VAR')/xyz
|
||||
2 | #include "$env('VAR')/stdio.h"
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
3 |
|
||||
4 | fn main() {
|
||||
|
@ -894,7 +894,7 @@ fn (mut s Scanner) text_scan() token.Token {
|
||||
return s.new_token(.comment, comment, comment.len + 2)
|
||||
}
|
||||
hash := s.text[start..s.pos].trim_space()
|
||||
return s.new_token(.hash, hash, hash.len)
|
||||
return s.new_token(.hash, hash, hash.len + 2)
|
||||
}
|
||||
`>` {
|
||||
if nextc == `=` {
|
||||
|
Loading…
Reference in New Issue
Block a user