Skip to content

Commit 894787f

Browse files
authored
Merge pull request highlightjs#40 from highlightjs/updates-084
Update syntax for Solidity 0.8.4
2 parents cd0f2a5 + 293d848 commit 894787f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

solidity.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ function hljsDefineSolidity(hljs) {
5757
'enum struct mapping address ' +
5858

5959
'new delete ' +
60-
'if else for while continue break return throw emit try catch ' +
60+
'if else for while continue break return throw emit try catch revert ' +
6161
'unchecked ' +
6262
//NOTE: doesn't always act as a keyword, but seems fine to include
6363
'_ ' +
6464

65-
'function modifier event constructor fallback receive ' +
65+
'function modifier event constructor fallback receive error ' +
6666
'virtual override ' +
6767
'constant immutable anonymous indexed ' +
6868
'storage memory calldata ' +
@@ -82,7 +82,7 @@ function hljsDefineSolidity(hljs) {
8282
'msg block tx abi ' +
8383
'type ' +
8484
'blockhash gasleft ' +
85-
'assert revert require ' +
85+
'assert require ' +
8686
'Error Panic ' +
8787
'sha3 sha256 keccak256 ripemd160 ecrecover addmod mulmod ' +
8888
'log0 log1 log2 log3 log4' +
@@ -291,6 +291,7 @@ function hljsDefineSolidity(hljs) {
291291
makeBuiltinProps('block', 'blockhash coinbase difficulty gaslimit number timestamp chainid'),
292292
makeBuiltinProps('tx', 'gasprice origin'),
293293
makeBuiltinProps('abi', 'decode encode encodePacked encodeWithSelector encodeWithSignature'),
294+
makeBuiltinProps('bytes', 'concat'),
294295
SOL_RESERVED_MEMBERS,
295296
{ // contracts & libraries & interfaces
296297
className: 'class',

0 commit comments

Comments
 (0)