2021-12-13 13:53:40 +00:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity >=0.8.0;
|
|
|
|
|
2021-12-20 13:10:17 +00:00
|
|
|
/// Some Error type E.
|
|
|
|
error E(uint, uint);
|
|
|
|
|
|
|
|
enum Weather {
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^^^^^^^ @whetherEnum
|
2021-12-20 13:10:17 +00:00
|
|
|
Sunny,
|
|
|
|
Cloudy,
|
|
|
|
Rainy
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Some custom Color enum type holding 3 colors.
|
|
|
|
enum Color {
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^^^^^ @ColorEnum
|
2021-12-20 13:10:17 +00:00
|
|
|
/// Red color.
|
|
|
|
Red,
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^^^ @EnumMemberRed
|
2021-12-20 13:10:17 +00:00
|
|
|
/// Green color.
|
|
|
|
Green,
|
|
|
|
/// Blue color.
|
|
|
|
Blue
|
|
|
|
}
|
|
|
|
|
2021-12-13 13:53:40 +00:00
|
|
|
library Lib
|
2022-03-15 17:52:59 +00:00
|
|
|
// @ ^^^ @LibLibrary
|
2021-12-13 13:53:40 +00:00
|
|
|
{
|
|
|
|
function add(uint a, uint b) public pure returns (uint result)
|
2022-03-01 17:56:17 +00:00
|
|
|
// ^( @addFunction
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^^^ @addSymbol
|
2021-12-13 13:53:40 +00:00
|
|
|
{
|
|
|
|
result = a + b;
|
|
|
|
}
|
|
|
|
|
2022-03-01 17:56:17 +00:00
|
|
|
// ^) @addFunction
|
2021-12-13 13:53:40 +00:00
|
|
|
function warningWithUnused() public pure
|
|
|
|
{
|
|
|
|
uint unused;
|
2022-03-01 17:56:17 +00:00
|
|
|
// ^^^^^^^^^^^ @diagnostics
|
2021-12-13 13:53:40 +00:00
|
|
|
}
|
|
|
|
}
|
2021-12-20 13:10:17 +00:00
|
|
|
|
|
|
|
struct RGBColor
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^^^^^^^^ @RGBColorStruct
|
2021-12-20 13:10:17 +00:00
|
|
|
{
|
|
|
|
uint8 red;
|
|
|
|
uint8 green;
|
|
|
|
uint8 blue;
|
|
|
|
}
|
2022-03-15 17:52:59 +00:00
|
|
|
// ----
|
|
|
|
// lib: @diagnostics 2072
|