mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser.v: document "e" check
This commit is contained in:
parent
6c7eaa7fd3
commit
ef737c5e61
@ -1933,8 +1933,9 @@ fn (p mut Parser) factor() string {
|
||||
switch tok {
|
||||
case INT:
|
||||
typ = 'int'
|
||||
//Check if float but not if is hexa
|
||||
if (p.lit.contains('.') || p.lit.contains('e')) && !(p.lit[0] == `0` && p.lit[1] == `x`) {
|
||||
// Check if float (`1.0`, `1e+3`) but not if is hexa
|
||||
if (p.lit.contains('.') || p.lit.contains('e')) &&
|
||||
!(p.lit[0] == `0` && p.lit[1] == `x`) {
|
||||
typ = 'f32'
|
||||
// typ = 'f64' // TODO
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user