MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / ParseExpTokenInParens

Function ParseExpTokenInParens

tests/external/gmock-1.7.0/gtest/scripts/pump.py:281–300  ·  view source on GitHub ↗
(lines, pos)

Source from the content-addressed store, hash-verified

279
280
281def ParseExpTokenInParens(lines, pos):
282 def ParseInParens(pos):
283 pos = Skip(lines, pos, OPTIONAL_WHITE_SPACES_REGEX)
284 pos = Skip(lines, pos, r'\(')
285 pos = Parse(pos)
286 pos = Skip(lines, pos, r'\)')
287 return pos
288
289 def Parse(pos):
290 pos = SkipUntil(lines, pos, r'\(|\)', ')')
291 if SubString(lines, pos, pos + 1) == '(':
292 pos = Parse(pos + 1)
293 pos = Skip(lines, pos, r'\)')
294 return Parse(pos)
295 else:
296 return pos
297
298 start = pos.Clone()
299 pos = ParseInParens(pos)
300 return MakeToken(lines, start, pos, 'exp')
301
302
303def RStripNewLineFromToken(token):

Callers 1

TokenizeLinesFunction · 0.85

Calls 3

ParseInParensFunction · 0.85
MakeTokenFunction · 0.85
CloneMethod · 0.45

Tested by

no test coverage detected