RainterpreterParserNPE2
Inherits: IParserV1, ERC165
Functions
supportsInterface
See {IERC165-supportsInterface}.
function supportsInterface(bytes4 interfaceId) public view override returns (bool);
parse
Parses a Rainlang string into an evaluable expression. MUST be
deterministic and MUST NOT have side effects. The only inputs are the
Rainlang string and the parse meta. MAY revert if the Rainlang string
is invalid. This function takes bytes
instead of string
to allow
for definitions of "string" other than UTF-8.
function parse(bytes memory data) external pure virtual override returns (bytes memory, uint256[] memory);
Parameters
Name | Type | Description |
---|---|---|
data | bytes | The Rainlang bytes to parse. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes | bytecode The expressions that can be evaluated. |
<none> | uint256[] | constants The constants that can be referenced by sources. |
parseMeta
Virtual function to return the parse meta.
function parseMeta() internal pure virtual returns (bytes memory);
operandHandlerFunctionPointers
Virtual function to return the operand handler function pointers.
function operandHandlerFunctionPointers() internal pure virtual returns (bytes memory);
literalParserFunctionPointers
Virtual function to return the literal parser function pointers.
function literalParserFunctionPointers() internal pure virtual returns (bytes memory);
buildOperandHandlerFunctionPointers
External function to build the operand handler function pointers.
function buildOperandHandlerFunctionPointers() external pure returns (bytes memory);
buildLiteralParserFunctionPointers
External function to build the literal parser function pointers.
function buildLiteralParserFunctionPointers() external pure returns (bytes memory);