Skip to content

Commit

Permalink
Warn ahead of time
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Jun 4, 2024
1 parent d3ff127 commit 2202b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tivars/types/tokenized.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ def load_bytes(self, data: bytes | BytesIO):

@Loader[str]
def load_string(self, string: str, *, model: TIModel = None, lang: str = None):
super().load_string(string, model=model, lang=lang)

if not self.is_tokenized:
warn("ASM programs may not have tokenized data.",
UserWarning)

super().load_string(string, model=model, lang=lang)

def string(self) -> str:
string = super().string()

Expand Down

0 comments on commit 2202b0f

Please sign in to comment.