static function initialise() { CompileTimeClassList::$lists = new haxe_ds_StringMap(); $m = haxe_rtti_Meta::getType(_hx_qtype("CompileTimeClassList")); if ($m->classLists !== null) { $_g = 0; $_g1 = $m->classLists; while ($_g < $_g1->length) { $item = $_g1[$_g]; ++$_g; $array = $item; $listID = $array[0]; $list = new HList(); $_g2 = 0; $_g3 = _hx_explode(",", $array[1]); while ($_g2 < $_g3->length) { $typeName = $_g3[$_g2]; ++$_g2; $type = Type::resolveClass($typeName); if ($type !== null) { $list->push($type); } unset($typeName, $type); } unset($_g3, $_g2); CompileTimeClassList::$lists->set($listID, $list); unset($listID, $list, $item, $array); } } }
public function results() { $list = new HList(); while ($this->hasNext()) { $list->add($this->next()); } return $list; }
public function results() { $l = new HList(); while (true) { $c = $this->next(); if ($c === null) { break; } $l->add($c); unset($c); } return $l; }
static function map($it, $f) { $l = new HList(); if (null == $it) { throw new HException('null iterable'); } $__hx__it = $it->iterator(); while ($__hx__it->hasNext()) { unset($x); $x = $__hx__it->next(); $l->add(call_user_func_array($f, array($x))); } return $l; }
public function filter($f) { $l2 = new HList(); $l = $this->h; while ($l !== null) { $v = $l[0]; $l = $l[1]; if (call_user_func_array($f, array($v))) { $l2->add($v); } unset($v); } return $l2; }
static function concat($a, $b) { $l = new HList(); if (null == $a) { throw new HException('null iterable'); } $__hx__it = $a->iterator(); while ($__hx__it->hasNext()) { unset($x); $x = $__hx__it->next(); $l->add($x); } if (null == $b) { throw new HException('null iterable'); } $__hx__it = $b->iterator(); while ($__hx__it->hasNext()) { unset($x1); $x1 = $__hx__it->next(); $l->add($x1); } return $l; }
public function parseExpr($data) { $l = new HList(); $expr = $data; while (haxe_Template::$expr_splitter->match($data)) { $p = haxe_Template::$expr_splitter->matchedPos(); $k = $p->pos + $p->len; if ($p->pos !== 0) { $l->add(_hx_anonymous(array("p" => _hx_substr($data, 0, $p->pos), "s" => true))); } $p1 = haxe_Template::$expr_splitter->matched(0); $l->add(_hx_anonymous(array("p" => $p1, "s" => _hx_index_of($p1, "\"", null) >= 0))); $data = haxe_Template::$expr_splitter->matchedRight(); unset($p1, $p, $k); } if (strlen($data) !== 0) { $l->add(_hx_anonymous(array("p" => $data, "s" => true))); } $e = null; try { $e = $this->makeExpr($l); if (!$l->isEmpty()) { throw new HException($l->first()->p); } } catch (Exception $__hx__e) { $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e; if (is_string($s = $_ex_)) { throw new HException("Unexpected '" . _hx_string_or_null($s) . "' in " . _hx_string_or_null($expr)); } else { throw $__hx__e; } } return array(new _hx_lambda(array(&$data, &$e, &$expr, &$l, &$s), "haxe_Template_0"), 'execute'); }
public function map($f) { $b = new HList(); $l = $this->h; while ($l !== null) { $v = $l[0]; $l = $l[1]; $b->add(call_user_func_array($f, array($v))); unset($v); } return $b; }
public function parseExpr($data) { $l = new HList(); $expr = $data; while (haxe_Template::$expr_splitter->match($data)) { $p = haxe_Template::$expr_splitter->matchedPos(); $k = $p->pos + $p->len; if ($p->pos !== 0) { $l->add(_hx_anonymous(array("p" => _hx_substr($data, 0, $p->pos), "s" => true))); } $p1 = haxe_Template::$expr_splitter->matched(0); $l->add(_hx_anonymous(array("p" => $p1, "s" => _hx_index_of($p1, "\"", null) >= 0))); $data = haxe_Template::$expr_splitter->matchedRight(); unset($p1, $p, $k); } if (strlen($data) !== 0) { $l->add(_hx_anonymous(array("p" => $data, "s" => true))); } $e = null; try { $e = $this->makeExpr($l); if (!$l->isEmpty()) { throw new HException($l->first()->p); } } catch (Exception $»e) { $_ex_ = $»e instanceof HException ? $»e->e : $»e; if (is_string($s = $_ex_)) { throw new HException("Unexpected '" . $s . "' in " . $expr); } else { throw $»e; } } return array(new _hx_lambda(array("_ex_" => &$_ex_, "data" => &$data, "e" => &$e, "expr" => &$expr, "k" => &$k, "l" => &$l, "p" => &$p, "p1" => &$p1, "s" => &$s, "»e" => &$»e), null, array(), "{\n\t\t\ttry {\n\t\t\t\treturn call_user_func_array(\$e, array());\n\t\t\t}catch(Exception \$»e2) {\n\t\t\t\$_ex_2 = (\$»e2 instanceof HException) ? \$»e2->e : \$»e2;\n\t\t\t;\n\t\t\t{ \$exc = \$_ex_2;\n\t\t\t{\n\t\t\t\tthrow new HException(((\"Error : \" . Std::string(\$exc)) . \" in \") . \$expr);\n\t\t\t}}}\n\t\t}"), 'execute0'); }