Skip to content

Commit e6d0045

Browse files
authored
Merge pull request #1 from sambacha/patch-2
2 parents 2867ac6 + 111c5d3 commit e6d0045

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "git+ssh://[email protected]/pospi/highlightjs-solidity.git"
15+
"url": "git+ssh://[email protected]/highlightjs/highlightjs-solidity.git"
1616
},
1717
"keywords": [
1818
"Solidity",
@@ -30,7 +30,7 @@
3030
"devDependencies": {
3131
"eslint": "^8.57.0",
3232
"eslint-config-standard": "^17.1.0",
33-
"highlight.js": "^11.9.0",
33+
"highlight.js": "^10.7.3",
3434
"highlightjs": "^9.16.2",
3535
"mocha": "^10.3.0",
3636
"parse5": "^7.1.2"

src/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ var SOL_ASSEMBLY_KEYWORDS = {
6363
'pc pop ' +
6464
'dup1 dup2 dup3 dup4 dup5 dup6 dup7 dup8 dup9 dup10 dup11 dup12 dup13 dup14 dup15 dup16 ' +
6565
'swap1 swap2 swap3 swap4 swap5 swap6 swap7 swap8 swap9 swap10 swap11 swap12 swap13 swap14 swap15 swap16 ' +
66-
'mload mstore mstore8 sload sstore msize tload tstore ' +
66+
'mload mstore mstore8 sload sstore msize tload tstore mcopy ' +
6767
'gas address balance selfbalance caller callvalue ' +
68-
'calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash mcopy ' +
68+
'calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash ' +
6969
'create create2 call callcode delegatecall staticcall ' +
7070
'log0 log1 log2 log3 log4 ' +
7171
'chainid origin gasprice basefee blobbasefee blockhash blobhash coinbase timestamp number difficulty prevrandao gaslimit ',

src/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
Language: Solidity
3+
Requires: solidity.js, yul.js
4+
Author: SEE AUTHOR
5+
Contributors: SEE CONTRIBUTORS
6+
Description: A statically-typed curly-braces programming language designed for developing smart contracts that run on Ethereum.
7+
Website: https://docs.soliditylang.org/en/latest/grammar.html
8+
*/
9+
10+
111
/**
212
* highlight.js Solidity syntax highlighting definition
313
*
@@ -8,8 +18,8 @@
818
* @since: 2016-07-01
919
*/
1020

11-
const solidityGrammar = require("./languages/solidity.js");
12-
const yulGrammar = require("./languages/yul.js");
21+
const solidityGrammar = require("./languages/solidity");
22+
const yulGrammar = require("./languages/yul");
1323

1424
module.exports = function(hljs) {
1525
hljs.registerLanguage('solidity', solidityGrammar);

src/languages/yul.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212
SOL_ASSEMBLY_KEYWORDS,
1313
baseAssembly,
1414
isNegativeLookbehindAvailable
15-
} = require("../common.js");
15+
} = require("../common");
1616

1717
function hljsDefineYul(hljs) {
1818

0 commit comments

Comments
 (0)