From b14352695dac7e7ae0d45ea66eb3ee2835766d89 Mon Sep 17 00:00:00 2001 From: Amanda Tang Date: Mon, 23 Sep 2024 13:48:32 -0700 Subject: [PATCH] Escaped braces should be strings --- mlir/dialect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/dialect.py b/mlir/dialect.py index 3a192ee..fb1cc64 100644 --- a/mlir/dialect.py +++ b/mlir/dialect.py @@ -79,8 +79,8 @@ def make_rules(cls): for fname, ftype in sfields: syntax = syntax.replace('{%s.%s}' % (fname, ftype), ftype) # Replace back braces - syntax = syntax.replace('{LBRACE}', '{') - syntax = syntax.replace('{RBRACE}', '}') + syntax = syntax.replace('{LBRACE}', '"{"') + syntax = syntax.replace('{RBRACE}', '"}"') lark_exprs.append(syntax) cls._fields_ = list(fields)