I am facing this issue and unsure how should I prefix this line as normally it wouldn't need any prefixing other than a simple comment. Anyone got an idea? Maybe this unchecked tag should be skipped in the iterator of soldoc/dist/generate.js:85:15
➜ tokenomics git:(ImportsManager) ✗ npx soldoc docs-md contracts/ecosystem/Contract.sol
/Users/adr/Dev/.../tokenomics/node_modules/@hq20/solidity-parser-antlr/dist/index.js:79
throw new ParserError({ errors: listener.getErrors() });
^
ParserError: no viable alternative at input 'unchecked{' (234:18)
at Object.parse (/Users/adr/Dev/.../tokenomics/node_modules/@hq20/solidity-parser-antlr/dist/index.js:79:11)
at Object.parseSingleSolidityFile (/Users/adr/Dev/.../tokenomics/node_modules/soldoc/dist/solidity.js:60:47)
at /Users/adr/Dev/.../tokenomics/node_modules/soldoc/dist/generate.js:85:80
at Array.forEach (<anonymous>)
at new Generate (/Users/adr/Dev/.../tokenomics/node_modules/soldoc/dist/generate.js:85:15)
at Object.generate (/Users/adr/Dev/.../tokenomics/node_modules/soldoc/dist/index.js:66:25)
at main (/Users/adr/Dev/.../tokenomics/node_modules/soldoc/dist/cli.js:61:20)
at Object.<anonymous> (/Users/adr/Dev/.../tokenomics/node_modules/soldoc/dist/cli.js:63:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) {
errors: [
{
message: "no viable alternative at input 'unchecked{'",
line: 234,
column: 18
}
]
}
Node.js v18.0.0
Contract source code:
...
function _calculateClaimableTokens(uint256 tokenId)
internal
view
returns (uint256 claimableAmount)
{
require(vestingToken[tokenId].exists, "VC: tokenId does not exist");
VestingInvestment memory investment = vestingToken[tokenId];
require(block.timestamp > investment.vestingStartTime);
uint256 vestedPeriods;
unchecked {
vestedPeriods = block.timestamp - investment.vestingStartTime;
}
...
I am facing this issue and unsure how should I prefix this line as normally it wouldn't need any prefixing other than a simple comment. Anyone got an idea? Maybe this
uncheckedtag should be skipped in the iterator ofsoldoc/dist/generate.js:85:15Contract source code: