A normal block with parameters.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract C {
function foo() public view {}
}
Warning
A Warning.
uint constant x = 42;
Text.
contract C {}
A block with blank lines between block parameters. Sphinx will treat the second one as a part of the code.
:language: Solidity
contract D {}
:linenos:
Block with parameters indented less than code. Sphinx does not complain about these.
contract E {}
More text.
:force:
let x := add(1, 5)
:linenos:
:language: Yul
// Yul code wrapped in object
{
let y := mul(3, 5)
}
// Yul code wrapped in named object
object "Test" {
let y := mul(3, 5)
:linenos:
}