mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: prepare for better VLS integration, more accurate parser errors (#7119)
This commit is contained in:
@@ -297,8 +297,7 @@ In development mode the compiler will warn you that you haven't used the variabl
|
||||
In production mode (enabled by passing the `-prod` flag to v – `v -prod foo.v`)
|
||||
it will not compile at all (like in Go).
|
||||
|
||||
<!-- this should be `failcompile`, but it compiles -->
|
||||
```v
|
||||
```v failcompile
|
||||
fn main() {
|
||||
a := 10
|
||||
if true {
|
||||
@@ -1736,9 +1735,9 @@ color = .green
|
||||
println(color) // "green"
|
||||
|
||||
match color {
|
||||
.red { ... }
|
||||
.green { ... }
|
||||
.blue { ... }
|
||||
.red { println('the color was red') }
|
||||
.green { println('the color was green') }
|
||||
.blue { println('the color was blue') }
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user