public function parseLiteral($ast) { if ($ast instanceof IntValueNode) { $val = (int) $ast->value; if ($ast->value === (string) $val && self::MIN_INT <= $val && $val <= self::MAX_INT) { return $val; } } return null; }