Skip to content

Commit

Permalink
support floats in buildifier2 (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Miguel committed May 31, 2020
1 parent 8de1905 commit 35db43b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions convertast/convert_ast.go
Expand Up @@ -5,7 +5,6 @@
package convertast

import (
"log"
"strconv"
"strings"

Expand Down Expand Up @@ -159,7 +158,9 @@ func convExpr(e syntax.Expr) build.Expr {
Token: strconv.FormatInt(e.Value.(int64), 10),
Comments: convComments(e.Comments())}
case syntax.FLOAT:
log.Fatal("float not yet supported")
return &build.LiteralExpr{
Token: e.Raw,
Comments: convComments(e.Comments())}
case syntax.STRING:
return &build.StringExpr{
Value: e.Value.(string),
Expand Down

0 comments on commit 35db43b

Please sign in to comment.