Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/clips/pattern
/ linecol
Function
linecol
pattern/web/json/decoder.py:58–64 ·
view source on GitHub ↗
(doc, pos)
Source
from the content-addressed store, hash-verified
56
57
58
def
linecol(doc, pos):
59
lineno = doc.count(
'\n'
, 0, pos) + 1
60
if
lineno == 1:
61
colno = pos
62
else
:
63
colno = pos - doc.rindex(
'\n'
, 0, pos)
64
return
lineno, colno
65
66
67
def
errmsg(msg, doc, pos, end=None):
Callers
2
__init__
Method · 0.85
errmsg
Function · 0.85
Calls
1
count
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…