MCPcopy Create free account
hub / github.com/IENT/YUView / fromText

Method fromText

tools/standardTextToCode/parseTables.py:313–320  ·  view source on GitHub ↗
(self, text : str)

Source from the content-addressed store, hash-verified

311 super().__init__(parent)
312 self.condition = None
313 def fromText(self, text : str):
314 if (not text.startswith("while")):
315 raise SyntaxError("While container does not start with while")
316 start = text.find("(")
317 end = text.rfind(")")
318 if (start == -1 or end == -1):
319 raise SyntaxError("While loop does not contain brackets")
320 self.condition = cleanCondition(text[start+1:end])
321 def __str__(self):
322 spaces = ""
323 for _ in range(self.parent.depth):

Callers 1

parseChildrenMethod · 0.95

Calls 1

cleanConditionFunction · 0.85

Tested by

no test coverage detected