Spaces Data

Minimal test - lines (351, 399)

path: .spaces[9].spaces[0].metrics.loc.cloc
old: 14.0
new: 16.0

path: .spaces[9].spaces[0].metrics.loc.sloc
old: 47.0
new: 49.0

path: .spaces[9].spaces[0].metrics.mi.mi_visual_studio
old: 42.683551775645306
new: 42.28875780974519

path: .spaces[9].spaces[0].metrics.mi.mi_original
old: 72.98887353635347
new: 72.31377585466427

path: .spaces[9].spaces[0].metrics.mi.mi_sei
old: 67.9318151704428
new: 68.24602243098968

Code

    def __init__(
        self,
        name,
        const=False,
        ptr=False,
        ptrptr=False,
        ptrconstptr=False,
        ref=False,
        rvalref=False,
        hasimplicitcopyctor=True,
        T=None,
        inner=None,
    ):
        """
        Represents the type |name::inner| with the ptr and const
        modifiers as specified.

        To avoid getting fancy with recursive types, we limit the kinds
        of pointer types that can be be constructed.

          ptr            => T*
          ptrptr         => T**
          ptrconstptr    => T* const*
          ref            => T&
          rvalref        => T&&

        Any type, naked or pointer, can be const (const T) or ref (T&)."""
        assert isinstance(name, str)
        assert isinstance(const, bool)
        assert isinstance(ptr, bool)
        assert isinstance(ptrptr, bool)
        assert isinstance(ptrconstptr, bool)
        assert isinstance(ref, bool)
        assert isinstance(rvalref, bool)
        assert not isinstance(T, str)

        Node.__init__(self)
        self.name = name
        self.const = const
        self.ptr = ptr
        self.ptrptr = ptrptr
        self.ptrconstptr = ptrconstptr
        self.ref = ref
        self.rvalref = rvalref
        self.hasimplicitcopyctor = hasimplicitcopyctor
        self.T = T
        self.inner = inner
        # XXX could get serious here with recursive types, but shouldn't
        # need that for this codegen