Exemple #1
0
        public Result<Declarator> WithName(Definable target, SourcePart position)
        {
            var result = new Declarator(Tags, target, Position + position);
            if (Target == null)
                return result;

            return result.Issues(IssueId.InvalidDeclarationTag.Create(Position));
        }
Exemple #2
0
 public Declarator Combine(Declarator other)
 {
     Tracer.Assert(Target == null|| other.Target == null);
     return new Declarator(Tags.plus(other.Tags), Target ?? other.Target, Position + other.Position);
 }