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

Method fromText

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

Source from the content-addressed store, hash-verified

371 self.breakCondition = None
372 self.increment = None
373 def fromText(self, text : str):
374 split = text.split(";")
375 if (not split[0].startswith("for")):
376 raise SyntaxError("For container does not start with for")
377
378 firstPart = split[0][split[0].find("(") + 1:]
379 self.variableName = cleanConditionPart(firstPart.split("=")[0])
380 self.initialValue = cleanConditionPart(firstPart.split("=")[1])
381 self.breakCondition = cleanCondition(split[1])
382 self.increment = cleanIncrement(split[2][0:split[2].find(")")])
383 def __str__(self):
384 spaces = ""
385 for _ in range(self.parent.depth):

Callers 1

parseChildrenMethod · 0.95

Calls 3

cleanConditionPartFunction · 0.85
cleanConditionFunction · 0.85
cleanIncrementFunction · 0.85

Tested by

no test coverage detected