1
0

IFの構文解析

This commit is contained in:
otya128
2015-06-06 17:11:02 +09:00
parent 2eaab2ef55
commit 5cab924046
6 changed files with 160 additions and 10 deletions

View File

@@ -45,4 +45,19 @@ struct Value
break;
}
}
bool boolValue()
{
switch(type)
{
case ValueType.Double:
return this.doubleValue != 0;
case ValueType.Integer:
return this.integerValue != 0;
case ValueType.String:
return true;//3.1現在では文字列はtrue(ただし!"A"などは動かない)
default:
//配列はtype missmatch
return false;
}
}
}