Implemented Value interface
This commit is contained in:
parent
fbcadae268
commit
9cfca57111
36 changed files with 194 additions and 153 deletions
|
@ -15,7 +15,7 @@ type Scope struct {
|
|||
// AddVariable adds a new variable to the current scope.
|
||||
func (s *Scope) AddVariable(variable *Variable) {
|
||||
s.Variables = append(s.Variables, variable)
|
||||
s.Use(variable.Register)
|
||||
s.Use(variable.Value.Register)
|
||||
}
|
||||
|
||||
// VariableByName returns the variable with the given name or `nil` if it doesn't exist.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue