mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
remove @ token
This commit is contained in:
parent
db772b63bc
commit
fa51b24a60
@ -353,14 +353,6 @@ fn (s mut Scanner) scan() ScanRes {
|
|||||||
s.pos--
|
s.pos--
|
||||||
}
|
}
|
||||||
return scan_res(HASH, hash.trim_space())
|
return scan_res(HASH, hash.trim_space())
|
||||||
case `@`:
|
|
||||||
start := s.pos + 1
|
|
||||||
for s.text[s.pos] != `\n` {
|
|
||||||
s.pos++
|
|
||||||
}
|
|
||||||
s.line_nr++
|
|
||||||
at := s.text.substr(start, s.pos)
|
|
||||||
return scan_res(AT, at.trim_space())
|
|
||||||
case `>`:
|
case `>`:
|
||||||
if s.text[s.pos + 1] == `=` {
|
if s.text[s.pos + 1] == `=` {
|
||||||
s.pos++
|
s.pos++
|
||||||
|
@ -29,7 +29,6 @@ enum Token {
|
|||||||
COLON
|
COLON
|
||||||
AMP
|
AMP
|
||||||
HASH
|
HASH
|
||||||
AT
|
|
||||||
DOLLAR
|
DOLLAR
|
||||||
LEFT_SHIFT
|
LEFT_SHIFT
|
||||||
RIGHT_SHIFT
|
RIGHT_SHIFT
|
||||||
@ -138,7 +137,6 @@ fn build_token_str() []string {
|
|||||||
s[PIPE] = '|'
|
s[PIPE] = '|'
|
||||||
s[HASH] = '#'
|
s[HASH] = '#'
|
||||||
s[AMP] = '&'
|
s[AMP] = '&'
|
||||||
s[AT] = '@'
|
|
||||||
s[INC] = '++'
|
s[INC] = '++'
|
||||||
s[DEC] = '--'
|
s[DEC] = '--'
|
||||||
s[AND] = '&&'
|
s[AND] = '&&'
|
||||||
@ -239,7 +237,7 @@ fn (t Token) str() string {
|
|||||||
fn (t Token) is_decl() bool {
|
fn (t Token) is_decl() bool {
|
||||||
// TODO return t in [FUNC ,TIP, CONST, IMPORT_CONST ,AT ,EOF]
|
// TODO return t in [FUNC ,TIP, CONST, IMPORT_CONST ,AT ,EOF]
|
||||||
return t == ENUM || t == INTERFACE || t == FUNC || t == STRUCT || t == TIP ||
|
return t == ENUM || t == INTERFACE || t == FUNC || t == STRUCT || t == TIP ||
|
||||||
t == CONST || t == IMPORT_CONST || t == AT || t == PUB || t == EOF
|
t == CONST || t == IMPORT_CONST || t == PUB || t == EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
Reference in New Issue
Block a user