================ @@ -89,6 +91,72 @@ class RootSignatureLexer { } }; +class RootSignatureParser { +public: + RootSignatureParser(SmallVector<RootElement> &Elements, + const SmallVector<RootSignatureToken> &Tokens); + + // Iterates over the provided tokens and constructs the in-memory + // representations of the RootElements. + // + // The return value denotes if there was a failure and the method will + // return on the first encountered failure, or, return false if it + // can sucessfully reach the end of the tokens. + bool Parse(); + +private: + bool ReportError(); // TODO: Implement this to report error through Diags ---------------- llvm-beanz wrote:
I don't think this should be separate. It's going to be really hard to ensure that any follow-up that adds error reporting properly covers all the cases. https://github.com/llvm/llvm-project/pull/122982 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits