Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit a3d98c9

Browse files
Replace noreturn with never
1 parent bbd03e9 commit a3d98c9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

grammars/php.cson

+2-2
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,8 @@
690690
'name': 'storage.type.php'
691691
}
692692
{
693-
'match': '\\b(noreturn)\\b',
694-
'name': 'keyword.other.type.noreturn.php'
693+
'match': '\\b(never)\\b',
694+
'name': 'keyword.other.type.never.php'
695695
}
696696
{
697697
'include': '#php-types'

spec/php-spec.coffee

+3-3
Original file line numberDiff line numberDiff line change
@@ -1721,12 +1721,12 @@ describe 'PHP grammar', ->
17211721
expect(tokens[5]).toEqual value: '?', scopes: ["source.php", "meta.function.closure.php", "keyword.operator.nullable-type.php"]
17221722
expect(tokens[6]).toEqual value: 'Client', scopes: ["source.php", "meta.function.closure.php", "support.class.php"]
17231723

1724-
it 'tokenizes noreturn type', ->
1725-
{tokens} = grammar.tokenizeLine 'function app_exit() : noreturn {}'
1724+
it 'tokenizes never type', ->
1725+
{tokens} = grammar.tokenizeLine 'function app_exit() : never {}'
17261726

17271727
expect(tokens[0]).toEqual value: 'function', scopes: ['source.php', 'meta.function.php', 'storage.type.function.php']
17281728
expect(tokens[6]).toEqual value: ':', scopes: ['source.php', 'meta.function.php', 'keyword.operator.return-value.php']
1729-
expect(tokens[8]).toEqual value: 'noreturn', scopes: ['source.php', 'meta.function.php', 'keyword.other.type.noreturn.php']
1729+
expect(tokens[8]).toEqual value: 'never', scopes: ['source.php', 'meta.function.php', 'keyword.other.type.never.php']
17301730

17311731
it 'tokenizes closure returning reference', ->
17321732
{tokens} = grammar.tokenizeLine 'function&() {}'

0 commit comments

Comments
 (0)