remove @ token

pull/679/head
Alexander Medvednikov 2019-06-26 17:16:06 +02:00
parent db772b63bc
commit fa51b24a60
2 changed files with 1 additions and 11 deletions

View File

@ -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++

View File

@ -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 (