Exemple #1
0
 static object SetLocation(object o, gppg.LexLocation start, gppg.LexLocation end)
 {
     if (o == null)
     {
         return(null);
     }
     sourcemap[o] = GetLocation(start, end);
     return(o);
 }
Exemple #2
0
        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)));
        }
Exemple #3
0
 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)));
 }
Exemple #4
0
 static ConsAnnotation AnnotateList(Cons obj, gppg.LexLocation start, gppg.LexLocation end)
 {
     return(AnnotationHelper.AnnotateList(obj, GetLocation(start, end)));
 }
Exemple #5
0
 static Annotation Annotate(object obj, gppg.LexLocation start)
 {
     return(Annotate(obj, GetLocation(start, start)));
 }