Skip to content

syntax: update php.syntax for missed reserved words#5057

Merged
mc-worker merged 1 commit intoMidnightCommander:masterfrom
KuzinAndrey:update-php-syntax
Mar 9, 2026
Merged

syntax: update php.syntax for missed reserved words#5057
mc-worker merged 1 commit intoMidnightCommander:masterfrom
KuzinAndrey:update-php-syntax

Conversation

@KuzinAndrey
Copy link
Contributor

Helper script:

RESERVED=$(
    wget -q -O- https://www.php.net/manual/en/reserved.keywords.php | \
    grep -Eo " class=\"link\">.*</a>$" | grep -v __ | \
    sed 's/ class="link">\(.*\)<\/a>/\1/g'
)
for K in $RESERVED ; do
  grep -q "keyword whole $K " php.syntax || echo $K
done

Output:

abstract
callable
clone
const
enddeclare
endfor
endforeach
endswitch
final
goto
implements
instanceof
insteadof
interface
namespace
trait
use
xor
yield
yield
from

Adding missing words and sorting lines alphabetically.

@github-actions github-actions bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Mar 9, 2026
@github-actions github-actions bot added this to the Future Releases milestone Mar 9, 2026
Helper script:
```sh
RESERVED=$(
    wget -q -O- https://www.php.net/manual/en/reserved.keywords.php | \
    grep -Eo " class=\"link\">.*</a>$" | grep -v __ | \
    sed 's/ class="link">\(.*\)<\/a>/\1/g'
)
for K in $RESERVED ; do
  grep -q "keyword whole $K " php.syntax || echo $K
done
```

Output:
```
abstract
callable
clone
const
enddeclare
endfor
endforeach
endswitch
final
goto
implements
instanceof
insteadof
interface
namespace
trait
use
xor
yield
yield
from
```
Adding missing words and sorting lines alphabetically.

Signed-off-by: Kuzin Andrey <kuzinandrey@yandex.ru>
@KuzinAndrey KuzinAndrey changed the title editor: update php.syntax for missed reserved words syntax: update php.syntax for missed reserved words Mar 9, 2026
@mc-worker mc-worker added area: mcedit mcedit, the built-in text editor and removed needs triage Needs triage by maintainers labels Mar 9, 2026
@mc-worker mc-worker modified the milestones: Future Releases, 4.9.0 Mar 9, 2026
@mc-worker mc-worker merged commit 9f0be66 into MidnightCommander:master Mar 9, 2026
11 checks passed
@KuzinAndrey KuzinAndrey deleted the update-php-syntax branch March 9, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcedit mcedit, the built-in text editor prio: medium Has the potential to affect progress

Development

Successfully merging this pull request may close these issues.

2 participants