package p.studio.compiler.models;

import p.studio.compiler.source.Span;
import p.studio.compiler.source.identifiers.FileId;

import java.util.Objects;

public record IRSyntheticOrigin(
        FileId fileId,
        String anchorCallableName,
        Span span) {
    public IRSyntheticOrigin {
        fileId = Objects.requireNonNull(fileId, "fileId");
        anchorCallableName = anchorCallableName == null ? "" : anchorCallableName;
        span = span == null ? Span.none() : span;
    }
}

