Skip to content

Commit ec55c68

Browse files
committed
Add some debugging messages
1 parent 32068fd commit ec55c68

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

token/set.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ func ResetResetTokens(root Token) {
3939

4040
// ResetScope resets all scopes of tokens in the token graph that fullfill the ScopeToken interface
4141
func ResetScope(root Token) {
42+
log.Debug("start reseting scope")
43+
4244
SetScope(root, make(map[string]Token))
45+
46+
log.Debug("finished reseting scope")
4347
}
4448

4549
// SetScope sets all scopes of tokens in the token graph that fullfill the ScopeToken interface

token/transform.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
// MinimizeTokens traverses the token graph and replaces unnecessary complicated constructs with their simpler form
1111
// One good example is an All list token with one token which can be replaced by this one token. The minimize checks and operation is done by the token itself which has to implement the MinimizeToken interface, since it is not always predictable if a token with one child is doing something special,
1212
func MinimizeTokens(root Token) Token {
13+
log.Debug("start minimizing")
14+
1315
parents := make(map[Token]Token)
1416
queue := linkedlist.New()
1517

@@ -54,6 +56,8 @@ func MinimizeTokens(root Token) Token {
5456
}
5557
}
5658

59+
log.Debug("finished minimizing")
60+
5761
return root
5862
}
5963

0 commit comments

Comments
 (0)