Revert "switch deprecation notice"

This reverts commit a43b831965.
pull/1765/head
Alexander Medvednikov 2019-08-27 13:10:07 +03:00
parent b48b076dac
commit f6147b7ac7
2 changed files with 15 additions and 21 deletions

View File

@ -723,16 +723,15 @@ fn new_v(args[]string) *V {
} }
} }
else { else {
_os = match target_os { switch target_os {
'linux' => { OS.linux } case 'linux': _os = .linux
'windows' => { OS.windows } case 'windows': _os = .windows
'mac' => { OS.mac } case 'mac': _os = .mac
'freebsd' => { OS.freebsd } case 'freebsd': _os = .freebsd
'openbsd' => { OS.openbsd } case 'openbsd': _os = .openbsd
'netbsd' => { OS.netbsd } case 'netbsd': _os = .netbsd
'dragonfly' => { OS.dragonfly } case 'dragonfly': _os = .dragonfly
'msvc' => { OS.msvc } case 'msvc': _os = .msvc
else => { OS.linux }
} }
} }
builtins := [ builtins := [

View File

@ -779,10 +779,6 @@ if p.scanner.line_comment != '' {
} }
} }
fn (p mut Parser) warn(s string) {
println('warning: $p.file_name:$p.scanner.line_nr ' + s)
}
fn (p mut Parser) error(s string) { fn (p mut Parser) error(s string) {
// Dump all vars and types for debugging // Dump all vars and types for debugging
if p.pref.is_debug { if p.pref.is_debug {
@ -3290,7 +3286,6 @@ fn (p mut Parser) for_st() {
fn (p mut Parser) switch_statement() { fn (p mut Parser) switch_statement() {
if p.tok == .key_switch { if p.tok == .key_switch {
//p.warn('`switch` was replaced `match`, it will be removed soon')
p.check(.key_switch) p.check(.key_switch)
} else { } else {
p.check(.key_match) p.check(.key_match)