[Mlir-commits] [mlir] [MLIR][TableGen] Make optional enum parser not consume the token when it is not matched (PR #188008)

Krzysztof Drewniak llvmlistbot at llvm.org
Mon Mar 23 08:38:35 PDT 2026


================
@@ -950,6 +950,12 @@ class AsmParser {
   parseOptionalKeyword(StringRef *keyword,
                        ArrayRef<StringRef> allowedValues) = 0;
 
+  /// Parse a string, if present, and if one of the 'allowedValues',
----------------
krzysz00 wrote:

I'd say "Parse a string into `result` if it is present and one of the `allowedValues`".

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


More information about the Mlir-commits mailing list