public function addPosition($position)
    {
        $position = PosBuilder::build($position);
        $generated = $position->generated;
        $source = $position->source;
        if ($generated->line === null) {
            throw new IncompleteData('required generated line number');
        }
        if ($generated->column === null) {
            throw new IncompleteData('required generated column number');
        }
        if ($this->sources->fillSource($source)) {
            if ($source->line === null) {
                throw new IncompleteData('required source line number');
            }
            if ($source->column === null) {
                throw new IncompleteData('required source column number');
            }
            $this->names->fillSource($source);
        }
        $this->context->getMappings()->addPosition($position);
        return $position;
    }