Skip to content

Support multiline hex literals. #32

@junderw

Description

@junderw

This was merged in argotorg/solidity#7524 1 year ago.

Given the case:

string memory a = 'abc' 'def'
   'ghi'     'jkl';

string memory b = 'abcdefghijkl';

bytes memory c = hex'dead' hex'beef'
     hex'deadbe' hex'ef';

bytes memory d = hex'deadbeefdeadbeef';

a == b and c == d in this case. line breaks and spaces can be in between each section.

It makes code readability much easier.

We use prettier, so doing this breaks formatting for us.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions