1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

remove old and unused @ syntax

This commit is contained in:
Alexander Medvednikov
2019-06-23 17:03:19 +02:00
parent 8b08bf636a
commit a401b5e242
2 changed files with 5 additions and 35 deletions

View File

@ -157,8 +157,6 @@ fn (p mut Parser) parse() {
// TODO remove imported consts from the language
p.import_statement()
}
case AT:
p.at()
case ENUM:
p.next()
if p.tok == NAME {
@ -3000,34 +2998,6 @@ fn (p mut Parser) return_st() {
p.returns = true
}
fn (p mut Parser) at() {
vals := p.lit.split(' ')
if vals.len != 2 {
p.error('Bad @ syntax (type name)')
}
typ := vals[0]
// name := vals[1]
if !p.table.known_type(typ) {
p.table.register_type(typ)
}
// if p.fn == "" {
// p.table.registerVar(&Var{
// Name: name,
// Type: typ,
// Cat: CatFunc,
// })
// } else {
//
// fn := p.table.findVar(p.fn)
// p.table.registerFnVar(&Var{
// Name: name,
// Type: typ,
// Cat: CatVar,
// }, fn)
// }
p.next()
}
fn prepend_pkg(pkg, name string) string {
return '${pkg}__${name}'
}