[Mlir-commits] [mlir] [mlir] MLIR-QUERY DefinitionsMatcher implementation & DAG (PR #115670)

Jacques Pienaar llvmlistbot at llvm.org
Thu Jan 9 22:55:08 PST 2025


================
@@ -144,6 +156,53 @@ class Parser::CodeTokenizer {
     return result;
   }
 
+  void consumeNumberLiteral(TokenInfo *result) {
+    bool isFloatingLiteral = false;
+    unsigned length = 1;
+    if (code.size() > 1) {
+      // Consume the 'x' or 'b' radix modifier, if present.
+      switch (tolower(code[1])) {
+      case 'x':
+      case 'b':
+        length = 2;
+      }
+    }
+    while (length < code.size() && isdigit(code[length]))
+      ++length;
+
+    // Try to recognize a floating point literal.
----------------
jpienaar wrote:

Where are floats needed in query?

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


More information about the Mlir-commits mailing list