public static GLSLSpan ToGLSLSpan(this SnapshotSpan span) { if (span.Start.Position == span.End.Position) { return(GLSLSpan.Create(span.Start.Position, span.End.Position)); } return(GLSLSpan.Create(span.Start.Position, span.End.Position - 1)); }
public static bool Overlaps(this GLSLSpan glslSpan, SnapshotSpan span) { if ((span.Start.Position >= glslSpan.Start && span.Start.Position <= glslSpan.End) || (span.End.Position - 1 <= glslSpan.End && span.End.Position - 1 >= glslSpan.Start)) { return(true); } return(false); }
public static VSSpan ToVSSpan(this GLSLSpan span) { return(VSSpan.FromBounds(span.Start, span.End + 1)); // return new VSSpan(span.Start, span.Length); }
public static GLSLSpan ToGLSLSpan(this VSSpan span) { return(GLSLSpan.Create(span.Start, span.End - 1)); }