from static method
Implementation
static ASTValueNum from(dynamic o, {bool? negative}) {
if (o is int) {
return ASTValueInt(o, negative: negative);
} else if (o is double) {
return ASTValueDouble(o, negative: negative);
} else if (o is String) {
return from(parseNum(o.trim()), negative: negative);
}
throw StateError("Can't parse number: $o");
}