File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,26 @@ type Expression interface {
25
25
expressionNode ()
26
26
}
27
27
28
+ // Deferrable is used to be able to
29
+ // check whether an expression needs
30
+ // to be executed now or at the end
31
+ // of the scope
28
32
type Deferrable interface {
29
33
IsDeferred () bool
30
34
SetDeferred (bool )
31
35
}
32
36
37
+ // Deferred is a struct that can be embedded
38
+ // in order to define whether the current node
39
+ // needs to be executed right away or whether
40
+ // it should be deferred until the end of the
41
+ // current scope.
33
42
type Deferred struct {
34
- Defer bool
43
+ deferred bool
35
44
}
36
45
37
- func (d * Deferred ) IsDeferred () bool { return d .Defer }
38
- func (d * Deferred ) SetDeferred (deferred bool ) { d .Defer = deferred }
46
+ func (d * Deferred ) IsDeferred () bool { return d .deferred }
47
+ func (d * Deferred ) SetDeferred (deferred bool ) { d .deferred = deferred }
39
48
40
49
// Represents the whole program
41
50
// as a bunch of statements
You can’t perform that action at this time.
0 commit comments