Re: [heycam/webidl] Enumeration order of interface members (#432)

So if we want to define this precisely, here's a proposal so there's some basis for discussion:

1.  Let |members| be a new [=ordered set=].
1.  Let |stack| be the result of invoking [=create an inheritance stack=] for [=interface=] |I|.
1.  [=iteration/While=] |stack| is not [=stack/empty=]:
    1.  Let |interface| be the result of [=stack/popping=] from |stack|.
    1.  [=set/Append=] [=For each|each=] |member| of |interface|'s
        [=interface member|members=] to |members|.
    1.  [=For each=] |partialInterface| of |interface| declared in the same specification as |interface|,
         in the order in which it appears in the specification:
         1.  [=set/Append=] [=For each|each=] |member| of |partialInterface|'s
             [=interface member|members=] to |members|.
    1.  [=For each=] |specification| that declares a [=partial interface=] of |interface|,
        lexicographically ordered by |specification|'s short name:
        1.  [=For each=] |partialInterface| of |interface| declared in |specification|,
            in the order in which it appears in |specification|:
            1.  [=set/Append=] [=For each|each=] |member| of |partialInterface|'s
                [=interface member|members=] to |members|.
    1.  [=For each=] |mixin| [=included=] by |interface|, declared in the same specification as |interface|,
        in the order in which it appears in the specification:
        1.  [=set/Append=] [=For each|each=] |member| of |mixin|'s
            [=mixin member|members=] to |members|.
        1.  [=For each=] |partialMixin| of |mixin| declared in the same specification as |mixin|,
            in the order in which it appears in the specification:
            1.  [=set/Append=] [=For each|each=] |member| of |partialMixin|'s
                [=mixin member|members=] to |members|.
        1.  [=For each=] |specification| that declares a [=partial mixin=] of |mixin|,
            lexicographically ordered by |specification|'s short name:
            1.  [=For each=] |partialMixin| of |mixin| declared in |specification|,
                in the order in which it appears in |specification|:
                1.  [=set/Append=] [=For each|each=] |member| of |partialMixin|'s
                    [=mixin member|members=] to |members|.
    1.  [=For each=] |specification| that declares a [=mixin=] [=included=] by |interface|,
        lexicographically ordered by |specification|'s short name:
        1.  [=For each=] |mixin| [=included=] by |interface| in |specification|,
            in the order in which it appears in |specification|:
            1.  [=For each=] |member| of |mixin|'s [=mixin member|members=]:
                1.  [=set/Append=] |member| to |members|.
            1.  [=For each=] |partialMixin| of |mixin| declared in the same specification as |mixin|,
                in the order in which it appears in the specification:
                1.  [=set/Append=] [=For each|each=] |member| of |mixin|'s
                    [=mixin member|members=] to |members|.
            1.  [=For each=] |specification| that declares a [=partial mixin=] of |mixin|,
                lexicographically ordered by |specification|'s short name:
                1.  [=For each=] |partialMixin| of |mixin| declared in |specification|,
                    in the order in which it appears in |specification|:
                    1.  [=set/Append=] [=For each|each=] |member| of |partialMixin|'s
                        [=mixin member|members=] to |members|.
1.  Return |members|.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/432#issuecomment-334233518

Received on Wednesday, 4 October 2017 17:40:23 UTC