public function parseLiteral($ast) { if ($ast instanceof FloatValueNode || $ast instanceof IntValueNode) { return (double) $ast->value; } return null; }