summaryrefslogtreecommitdiff
path: root/tests/examplefiles/test.boo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles/test.boo')
-rw-r--r--tests/examplefiles/test.boo39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/examplefiles/test.boo b/tests/examplefiles/test.boo
deleted file mode 100644
index d6107aa7..00000000
--- a/tests/examplefiles/test.boo
+++ /dev/null
@@ -1,39 +0,0 @@
-import System
-import Boo.Lang.Interpreter from Boo.Lang.Interpreter
-
-class ObjectInterpreter(AbstractInterpreter):
-
- _context as object
-
- [getter(Value)]
- _value as object
-
- def constructor(context):
- _context = context
- self.RememberLastValue = true
-
- override def Lookup(name as string):
- property = _context.GetType().GetProperty(name)
- return property.PropertyType if property is not null
-
- override def GetValue(name as string):
- return _context.GetType().GetProperty(name).GetValue(
- _context, null)
-
- override def SetLastValue(value):
- _value = value
-
- override def SetValue(name as string, value):
- raise InvalidOperationException()
-
- override def Declare(name as string, type as Type):
- raise InvalidOperationException()
-
-class Person:
- [property(FirstName)]
- _fname as string = ""
-
-p = Person(FirstName: "Homer")
-i = ObjectInterpreter(p)
-i.Eval('"Hello, ${FirstName.ToUpper()}!"')
-print i.Value