Skip to content

Commit

Permalink
clean up dead code; need to re-evaluate checking the usage of this
Browse files Browse the repository at this point in the history
…outside of class instances
  • Loading branch information
kaidesu committed Oct 27, 2023
1 parent dbf344e commit 6cb6f49
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions evaluator/this.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package evaluator

import (
"fmt"

"ghostlang.org/x/ghost/ast"
"ghostlang.org/x/ghost/object"
)
Expand All @@ -14,9 +12,5 @@ func evaluateThis(node *ast.This, scope *object.Scope) object.Object {

pairs := make(map[object.MapKey]object.MapPair)

fmt.Printf("self: %v\n", scope.Self)

return &object.Map{Pairs: pairs}

// return object.NewError("%d:%d:%s: runtime error: cannot call 'this' outside of scope", node.Token.Line, node.Token.Column, node.Token.File)
}

0 comments on commit 6cb6f49

Please sign in to comment.