Skip to content

Improve support for Pragma Version Ranges #112

@Janther

Description

@Janther

As @lvdthieu reported on #110, we are not currently supporting all of the options for ranges supported by the Pragma Directive.

Solidity documentation states that they follow the npm syntax.

And npm also offers a neat grammar for us to adopt.

Solidity's grammar however is much more relaxed and accepts any string that doesn't contain a ;.

Right now we are doing a little bit of the nom's server rules but not all of them. and we could go all in either way.
If we implement rpm's server rules, we might need to introduce a breaking change in the PragmaDirective type and instead of returning a single version string, we might need to return an array of versionRanges.
This could be helpful to some analytic tools.

What are your thoughts @fvictorio

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