Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PyMesh/PyMesh
/ RStripNewLineFromToken
Function
RStripNewLineFromToken
tests/external/gmock-1.7.0/gtest/scripts/pump.py:303–307 ·
view source on GitHub ↗
(token)
Source
from the content-addressed store, hash-verified
301
302
303
def
RStripNewLineFromToken(token):
304
if
token.value.endswith(
'\n'
):
305
return
Token(token.start, token.end, token.value[:-1], token.token_type)
306
else
:
307
return
token
308
309
310
def
TokenizeLines(lines, pos):
Callers
1
TokenizeLines
Function · 0.85
Calls
1
Token
Class · 0.70
Tested by
no test coverage detected