private void UpdateLocation(ParserRuleContext context) { if (context == null) ThrowHelper.ThrowArgumentNullException(() => context); var start = new TextLocation(context.Start.Line, context.Start.StartIndex); var end = new TextLocation(context.Stop.Line, context.Stop.StopIndex); CompilerService.CurrentSpan = new TextSpan(start, end); }
public TextSpan(TextLocation start, TextLocation end) { if (start == null) ThrowHelper.ThrowArgumentNullException(() => start); if (end == null) ThrowHelper.ThrowArgumentNullException(() => end); Start = start; End = end; }