Files
expr/cmd/ecli/graph.go
T

22 lines
413 B
Go

// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
// All rights reserved.
//go:build graph
// NOTE: Enable this build tag to print the graph of the expression instead of evaluating it.
// go run -tags graph cmd/ecli/main.go
// graph.go
package main
import (
"fmt"
"git.portale-stac.it/go-pkg/expr"
)
func printGraph() {
r := expr.NewExprReticle(ast)
fmt.Println(r.String())
}