MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / GetColumn

Method GetColumn

LuaParser/src/File/LuaSource.cpp:49–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49std::size_t LuaSource::GetColumn(std::size_t offset) const {
50 auto line = GetLine(offset);
51
52 auto lineStartOffset = _lineOffsetVec[line];
53
54 if (offset > lineStartOffset) {
55 auto bytesLength = offset - lineStartOffset;
56 return utf8::Utf8nLen(_source.data() + lineStartOffset,
57 bytesLength);
58 }
59 return 0;
60}
61
62
63bool LuaSource::CheckNonUniformCharBefore(std::size_t offset) const {

Callers 7

DiagnosticInspectionFunction · 0.80
DiagnosticToJsonFunction · 0.80
MakeDiagnosticInfoMethod · 0.80
MakeDiagnosticInfoMethod · 0.80
ResolveAlignGroupMethod · 0.80
GetStartColMethod · 0.80
GetEndColMethod · 0.80

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected