hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.25k stars 208 forks source link

NatSpec annotations not supported #1524

Closed BenTheKush closed 11 months ago

BenTheKush commented 11 months ago

Describe the bug The Solidity docs describe NatSpec which allows annotations of the form "@custom:<name>".

I've documented this bug in this repository, but here are the details:

issue1524.sol:

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

/** 
 * The following example is taken from solidity docs:
 * https://docs.soliditylang.org/en/v0.8.17/natspec-format.html#documentation-example
 */

/// @title A simulator for trees
/// @author Larry A. Gardner
/// @notice You can use this contract for only the most basic simulation
/// @dev All function calls are currently implemented without side effects
/// @custom:experimental This is an experimental contract.
library Issue1524 {
}

Running solang fails

$  solang compile --target solana issue1524.sol 
error: tag '@custom:experimental' is not valid for contract
   ┌─ /Users/benku/Playground/issue1524.sol:13:6
   │
13 │ /// @custom:experimental This is an experimental contract.
   │      ^^^^^^^^^^^^^^^^^^^^

solang version v0.3.0 revision: "70af554c42748009e414e6263dd4607fb380e5dc"