Prechádzať zdrojové kódy

Tolerate and normalize nested tokens.

scossu 11 mesiacov pred
rodič
commit
5931fa8777
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      scriptshifter/tables/__init__.py

+ 1 - 1
scriptshifter/tables/__init__.py

@@ -67,7 +67,7 @@ class Token(str):
     flags = 0
 
     def __init__(self, content):
-        self.content = content
+        self.content = str(content)  # Normalize in case a token is passed.
 
         # Assign special precedence based on token position.
         # Standalone has precedence, then initial, then final, then medial.