[clang] [HLSL][RootSignature] Implement Lexing of DescriptorTables (PR #122981)
Ashley Coleman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 15 14:25:22 PST 2025
================
@@ -0,0 +1,152 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+namespace llvm {
+namespace hlsl {
+namespace root_signature {
+
+// Lexer Definitions
+
+static bool IsPreprocessorNumberChar(char C) {
+ // TODO: extend for float support with or without hexadecimal/exponent
+ return isdigit(C); // integer support
+}
+
+bool RootSignatureLexer::LexNumber(RootSignatureToken &Result) {
+ // NumericLiteralParser does not handle the sign so we will manually apply it
+ Result.Signed = Buffer.front() == '-';
----------------
V-FEXrt wrote:
I'm assuming no, but is unary `+` allowed here?
https://github.com/llvm/llvm-project/pull/122981
More information about the cfe-commits
mailing list