// Copyright (c) 2024-2026 Celestino Amoroso (celestino.amoroso@gmail.com).
// All rights reserved.

//go:build graph

// t_graph_test.go
package expr

import (
	"fmt"
	"testing"
)

func TestGraph(t *testing.T) {
	// tk0 := NewToken(0, 0, SymChangeSign, "-")
	tk1 := NewValueToken(0, 0, SymInteger, "100", 100)
	tk2 := NewToken(0, 0, SymPlus, "+")
	tk3 := NewValueToken(0, 0, SymInteger, "200", 200)

	tree := NewAst()
	// tree.addToken(tk0)
	tree.addToken(tk1)
	tree.addToken(tk2)
	tree.addToken(tk3)
	tk4 := NewToken(0, 0, SymPlus, "-")
	tk5 := NewValueToken(0, 0, SymInteger, "50", 50)
	tree.addToken(tk4)
	tree.addToken(tk5)

	g := BuildGraph(tree.root)
	fmt.Println(g)
}
