Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

remainingTokens is not accessible after parsing #77

@vogel

Description

@vogel

I was trying to extract remainingTokens from InternalParseResult from failed parse, but I was not able to. It seems that remainingTokens are a pair of iterators that are no longer valid after Parser::parse() method was finished.

I think it means that return value of Parser::parser() has wrong return type, as it gives access to variables that cannot be accessed. It could be fixed by either changing the return type, make variables valid at that point, or add a new TokenStream/std::vectorstd::string member to Parser class that will contain remainingTokens after parse() is finished.

I've ended up with implementing my own class from Parser that does the last thing.

Please let me know what do you think about it (nb.: in some previous version of clara those values were easily accessible by unusedTokens() method).

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