(g *Globals, t model.FieldType, n *model.Node)
| 9 | ) |
| 10 | |
| 11 | func valueWrapperLua(g *Globals, t model.FieldType, n *model.Node) string { |
| 12 | |
| 13 | switch t { |
| 14 | case model.FieldType_String: |
| 15 | return util.StringWrap(util.StringEscape(n.Value)) |
| 16 | case model.FieldType_Enum: |
| 17 | if g.LuaEnumIntValue { |
| 18 | return fmt.Sprintf("%d", n.EnumValue) |
| 19 | } else { |
| 20 | return fmt.Sprintf("\"%s\"", n.Value) |
| 21 | } |
| 22 | |
| 23 | } |
| 24 | |
| 25 | return n.Value |
| 26 | } |
| 27 | |
| 28 | type luaPrinter struct { |
| 29 | } |
no test coverage detected