mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: prompt error if trying to use f for floats
This commit is contained in:
parent
4b9cc1246e
commit
52c2763ee3
@ -146,6 +146,9 @@ fn (s mut Scanner) ident_dec_number() string {
|
|||||||
for s.pos < s.text.len && s.text[s.pos].is_digit() {
|
for s.pos < s.text.len && s.text[s.pos].is_digit() {
|
||||||
s.pos++
|
s.pos++
|
||||||
}
|
}
|
||||||
|
if !s.inside_string && s.pos < s.text.len && s.text[s.pos] == `f` {
|
||||||
|
s.error('no `f` is needed for floats')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// scan exponential part
|
// scan exponential part
|
||||||
|
Loading…
Reference in New Issue
Block a user