[clang] [HLSL][RootSignature] Implement Lexing of DescriptorTables (PR #122981)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 09:27:07 PST 2025


https://github.com/llvm-beanz commented:

In general I think this is very much moving in the right direction. I have two high level areas of feedback (see my more specific comments inline).

In general, Lexer's don't often have the context to provide actionable error messages. As a result it is _usually_ better for the Lexer to push up an invalid token to the parser and allow the parser to provide a more contextually relevant diagnostic.

The other area is around what is the responsibility of the parser vs the lexer. In general lexers just break the input into tokens, the parser then interprets and validates the tokens. In particular around numbers this is doing a lot of interpretation of the token values. I think it is probably better to have a clearer separation.

https://github.com/llvm/llvm-project/pull/122981


More information about the cfe-commits mailing list