変数を使う時の捜索順を変更
This commit is contained in:
1 parent
c466670b5f
commit
3c14a80890
5 files changed
+51
-16
No files matched your search
@@ -90,6 +90,21 @@ struct Value
|
||||
{
|
||||
return this.type == ValueType.Integer ? this.integerValue : (this.type == ValueType.Double ? this.doubleValue : 0);
|
||||
}
|
||||
string toString()
|
||||
{
|
||||
import std.conv;
|
||||
switch(this.type)
|
||||
{
|
||||
case ValueType.Void:
|
||||
return "void";
|
||||
case ValueType.Integer:
|
||||
return this.integerValue.to!string;
|
||||
case ValueType.String:
|
||||
return this.stringValue.to!string;
|
||||
default:
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
}
|
||||
class Array(T)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user