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

Function removeComments

tools/standardTextToCode/parseTables.py:12–22  ·  view source on GitHub ↗
(text : str)

Source from the content-addressed store, hash-verified

10 return False
11 return isVariableName(text.split("(")[0].strip())
12def removeComments(text : str):
13 commentStart = text.find("/*")
14 while (commentStart != -1):
15 commentEnd = text.find("*/")
16 if (commentEnd == -1):
17 return text
18 if (commentEnd <= commentStart):
19 raise SyntaxError("Error removing comment. End before start. Line: " + text)
20 text = text[0:commentStart] + text[commentEnd+2:]
21 commentStart = text.find("/*")
22 return text.strip()
23def cleanCondition(text : str):
24 text = text.strip()
25 text = text.replace("=\xa0=", "==")

Callers 1

getEntryTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected