================ @@ -0,0 +1,166 @@ +#include "clang/Parse/ParseHLSLRootSignature.h" + +namespace clang { +namespace hlsl { + +// Lexer Definitions + +static bool IsNumberChar(char C) { + // TODO(#126565): extend for float support exponents + return isdigit(C); // integer support +} + +bool RootSignatureLexer::LexNumber(RootSignatureToken &Result) { + // Retrieve the possible number + StringRef NumSpelling = Buffer.take_while(IsNumberChar); ---------------- inbelic wrote:
Correct. It is the expected behaviour for this pr, as we are not expecting to handle floats until https://github.com/llvm/llvm-project/issues/126565. This was split out because I want to have a pr that will have dedicated documentation and testing to show that the float parsing is equivalent to DXC. Which I think would get bogged down and increase the scope when including it in this pr. https://github.com/llvm/llvm-project/pull/122981 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits