Skip to content

feat(solidity): cancun support #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/pospi/highlightjs-solidity.git"
"url": "git+ssh://git@github.com/highlightjs/highlightjs-solidity.git"
},
"keywords": [
"Solidity",
Expand All @@ -30,7 +30,7 @@
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"highlight.js": "^11.9.0",
"highlight.js": "^10.7.3",
"highlightjs": "^9.16.2",
"mocha": "^10.3.0",
"parse5": "^7.1.2"
Expand Down
4 changes: 2 additions & 2 deletions src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ var SOL_ASSEMBLY_KEYWORDS = {
'pc pop ' +
'dup1 dup2 dup3 dup4 dup5 dup6 dup7 dup8 dup9 dup10 dup11 dup12 dup13 dup14 dup15 dup16 ' +
'swap1 swap2 swap3 swap4 swap5 swap6 swap7 swap8 swap9 swap10 swap11 swap12 swap13 swap14 swap15 swap16 ' +
'mload mstore mstore8 sload sstore msize tload tstore ' +
'mload mstore mstore8 sload sstore msize tload tstore mcopy ' +
'gas address balance selfbalance caller callvalue ' +
'calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash mcopy ' +
'calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash ' +
'create create2 call callcode delegatecall staticcall ' +
'log0 log1 log2 log3 log4 ' +
'chainid origin gasprice basefee blobbasefee blockhash blobhash coinbase timestamp number difficulty prevrandao gaslimit ',
Expand Down
14 changes: 12 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
Language: Solidity
Requires: solidity.js, yul.js
Author: SEE AUTHOR
Contributors: SEE CONTRIBUTORS
Description: A statically-typed curly-braces programming language designed for developing smart contracts that run on Ethereum.
Website: https://docs.soliditylang.org/en/latest/grammar.html
*/


/**
* highlight.js Solidity syntax highlighting definition
*
Expand All @@ -8,8 +18,8 @@
* @since: 2016-07-01
*/

const solidityGrammar = require("./languages/solidity.js");
const yulGrammar = require("./languages/yul.js");
const solidityGrammar = require("./languages/solidity");
const yulGrammar = require("./languages/yul");

module.exports = function(hljs) {
hljs.registerLanguage('solidity', solidityGrammar);
Expand Down
2 changes: 1 addition & 1 deletion src/languages/yul.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
SOL_ASSEMBLY_KEYWORDS,
baseAssembly,
isNegativeLookbehindAvailable
} = require("../common.js");
} = require("../common");

function hljsDefineYul(hljs) {

Expand Down