This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/php/lang/ast/nodes/Signature.class.php b/src/main/php/lang/ast/nodes/Signature.class.php | |
index 76e3e94..0d946fb 100755 | |
--- a/src/main/php/lang/ast/nodes/Signature.class.php | |
+++ b/src/main/php/lang/ast/nodes/Signature.class.php | |
@@ -5,6 +5,7 @@ use lang\ast\Node; | |
class Signature extends Node { | |
public $kind= 'signature'; | |
public $parameters, $returns, $byref; | |
+ public $generics= []; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use web\Application; | |
use web\frontend\{Frontend, Handlebars, Get, Post, Delete, Param, View}; | |
class Reactive extends Application { | |
public function routes() { | |
$impl= new class() { | |
private $list= ['One', 'Two']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Input</title> | |
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> | |
<style> | |
#prompt { | |
font-family: 'Roboto', sans-serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Speech test</title> | |
</head> | |
<body> | |
<h1>Speech test</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use util\cmd\Console; | |
class ByLazy { | |
public function __construct(private callable $init) { } | |
public function get($self, $property) { | |
return ($property->value??= [($this->init)()])[0]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/php/lang/ast/emit/PHP.class.php b/src/main/php/lang/ast/emit/PHP.class.php | |
index b15f8bb..e85c8ba 100755 | |
--- a/src/main/php/lang/ast/emit/PHP.class.php | |
+++ b/src/main/php/lang/ast/emit/PHP.class.php | |
@@ -436,7 +436,7 @@ abstract class PHP extends Emitter { | |
// Virtual properties support: __virtual member + __get() and __set() | |
if ($context->virtual) { | |
- $result->out->write('private $__virtual= ['); | |
+ $result->out->write('protected $__virtual= ['); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace xp\test; | |
use io\{File, FolderEntries}; | |
use lang\{Environment, IllegalStateException, IllegalArgumentException}; | |
use util\cmd\Console; | |
class Coverage extends Report { | |
private $coverage= []; | |
private $include; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace util\address; | |
use IteratorAggregate, Traversable; | |
use io\streams\InputStream; | |
use text\StreamTokenizer; | |
use lang\FormatException; | |
class JsonIterator implements IteratorAggregate { | |
const SEPARATOR= '/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace test; | |
use io\streams\LinesIn; | |
use io\{File, Files, Folder, Path}; | |
use util\cmd\Console; | |
// Yields all files with a given extension inside a given folder | |
function filesIn(Folder $folder, string $extension): iterable { | |
$end= -1 * strlen($extension); | |
foreach ($folder->entries() as $entry) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use de\thekid\dialog\color\Colors; | |
use img\Image; | |
use img\io\StreamReader; | |
use io\{File, Path, Folder}; | |
use util\cmd\Console; | |
use util\profiling\Timer; | |
class Glob implements IteratorAggregate { |