================ @@ -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); ---------------- llvm-beanz wrote:
If I'm reading this correctly right now if someone writes `1.3` the parser will break the token at the `.`, call it an integer literal and return `1` for the value. I assume that's not the expected behavior? 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