Skip to content

Commit

Permalink
Remove deprecated <T> syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 23, 2024
1 parent f1bd59e commit ee354ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/test/php/lang/ast/unittest/emit/EmittingTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected function transform($type, $function) {
*/
protected function emit($code) {
$name= 'E'.(self::$id++);
$tree= $this->language->parse(new Tokens(str_replace('<T>', $name, $code), static::class))->tree();
$tree= $this->language->parse(new Tokens(str_replace('%T', $name, $code), static::class))->tree();

$out= new MemoryOutputStream();
$this->emitter->emitAll(new GeneratedCode($out, ''), $tree->children());
Expand Down Expand Up @@ -91,8 +91,6 @@ protected function declare($code) {
$name= 'T'.(self::$id++);
if (strstr($code, '%T')) {
$declaration= str_replace('%T', $name, $code);
} else if (strstr($code, '<T>')) {
$declaration= str_replace('<T>', $name, $code); // deprecated
} else {
$declaration= $code.' class '.$name.' { }';
}
Expand Down

0 comments on commit ee354ae

Please sign in to comment.