Skip to content

Commit

Permalink
Fix _maybe_att
Browse files Browse the repository at this point in the history
  • Loading branch information
tothtamas28 committed Jul 18, 2024
1 parent e922217 commit cd9eda9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pyk/src/pyk/kast/outer_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,13 @@ def _maybe_att(self) -> Att:
value: str
if self._la.type == TokenType.LPAREN:
self._consume()
if self._la.type is TokenType.ATTR_CONTENT:
value = self._consume()
else:
value = _dequote_string(self._match(TokenType.STRING))
match self._la.type:
case TokenType.ATTR_CONTENT:
value = self._consume()
case TokenType.STRING:
value = _dequote_string(self._consume())
case _:
value = ''
self._match(TokenType.RPAREN)
else:
value = ''
Expand Down

0 comments on commit cd9eda9

Please sign in to comment.