andygeiss/esp32-transpiler

View on GitHub
transpile/handlers/handleValueSpec.go

Summary

Maintainability
A
0 mins
Test Coverage
package handlers

import "go/ast"

func handleValueSpec(spec ast.Spec) string {
    s := spec.(*ast.ValueSpec)
    code := ""
    code += handleValueSpecType(s.Type)
    code += " "
    code += handleValueSpecNames(s.Names)
    if s.Values != nil {
        code += " = "
        code += handleValueSpecValues(s.Values)
    }
    return code
}