Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Splits PHP types

Author Dave Jarvis <email>
Date 2026-02-15 14:14:54 GMT-0800
Commit 1111eb463220c049de429d8db4bc1949ea8829e5
Parent 2d6223f
Delta 7 lines added, 2 lines removed, 5-line increase
render/LanguageDefinitions.php
'string' => '/(\'(?:\\\\.|[^\'\\\\])*\')/',
'comment' => '/(\/\/[^\r\n]*|#[^\r\n]*|\/\*.*?\*\/)/ms',
- 'keyword' => '/\b(?:abstract|and|array|as|bool|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|float|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|int|interface|isset|iterable|list|match|mixed|namespace|never|new|object|or|print|private|protected|public|readonly|require|require_once|return|static|string|switch|throw|trait|try|unset|use|var|void|while|xor|yield)\b/',
+ 'type' => '/\b(?:array|bool|callable|float|int|iterable|mixed|never|object|string|void)\b/',
+ 'keyword' => '/\b(?:abstract|and|as|break|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|print|private|protected|public|readonly|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/',
'function' => '/\b([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(?=\()/',
'variable' => '/(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/',
repo.css
.hl-class,
-.hl-type,
.hl-interface,
.hl-struct {
color: #a9dc76;
+}
+
+.hl-type {
+ color: #66d9ef;
+ font-style: italic;
}