[Mlir-commits] [mlir] Add AsmParser::parseDecimalInteger. (PR #96255)
Jacques Pienaar
llvmlistbot at llvm.org
Fri Jul 12 18:41:28 PDT 2024
================
@@ -64,6 +66,25 @@ void CompoundAAttr::print(AsmPrinter &printer) const {
// CompoundAAttr
//===----------------------------------------------------------------------===//
+
+Attribute TestDecimalIntegerAttr::parse(AsmParser &parser, Type type) {
+ if (parser.parseLess()){
+ return Attribute();
+ }
+ uint64_t intVal;
+ if (failed(*parser.parseOptionalDecimalInteger(intVal))) {
+ return Attribute();
+ }
+ if (parser.parseGreater()) {
----------------
jpienaar wrote:
Actually `5` instead of `a` means you can reuse test below but as a single positive one.
https://github.com/llvm/llvm-project/pull/96255
More information about the Mlir-commits
mailing list