static object SetLocation(object o, gppg.LexLocation start, gppg.LexLocation end) { if (o == null) { return(null); } sourcemap[o] = GetLocation(start, end); return(o); }
static SourceSpan GetLocation(gppg.LexLocation start, gppg.LexLocation end) { int ecol = end.eCol + 1; if (ecol <= 0) { ecol = 1; } return(new SourceSpan( new SourceLocation(1, start.sLin, start.sCol + 1), new SourceLocation(1, end.eLin, ecol))); }
protected override SourceSpan GetLocation(gppg.LexLocation loc) { return(new SourceSpan( new SourceLocation(1, loc.sLin, loc.sCol + 1), new SourceLocation(1, loc.eLin, loc.eCol + 1))); }
static ConsAnnotation AnnotateList(Cons obj, gppg.LexLocation start, gppg.LexLocation end) { return(AnnotationHelper.AnnotateList(obj, GetLocation(start, end))); }
static Annotation Annotate(object obj, gppg.LexLocation start) { return(Annotate(obj, GetLocation(start, start))); }