andygeiss/esp32-transpiler

View on GitHub
transpile/handlers/handleBinaryExpr.go

Summary

Maintainability
A
0 mins
Test Coverage
package handlers

import "go/ast"

func handleBinaryExpr(expr ast.Expr) string {
    be := expr.(*ast.BinaryExpr)
    code := HandleExpr(be.X)
    code += be.Op.String()
    code += HandleExpr(be.Y)
    return code
}