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

fmt: short_module for enum values

This commit is contained in:
hazohelet 2020-04-09 01:55:50 +09:00 committed by GitHub
parent d38acb5487
commit 78fc9bd12b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -473,7 +473,8 @@ fn (f mut Fmt) expr(node ast.Expr) {
f.write('`$it.val`')
}
ast.EnumVal {
f.write(it.enum_name + '.' + it.val)
name := short_module(it.enum_name)
f.write(name + '.' + it.val)
}
ast.FloatLiteral {
f.write(it.val)