[nem-en] What is additional_decls?
vc
vc at rsdn.ru
Fri Nov 17 20:12:36 CET 2006
> It is (maybe a little bit inelegant) implementation of parsed members
> queue for processing. Initially TypeBuilder holds the pt_tydecl -
> parsed tree of class, which contains parsed members inside. Those
> members are analyzed between BeforeTypedMemebers and AfterTypedMembers
> states. BUT before this processing can happen some macro might add new
> members by using Define method - since we cannot modify the original
> parse tree of class (and we cannot store new member in typed form, as
> typing of members did not begin yet) we must store is somewhere for
> later processing.
>
> So in fact processing of parsed members first consider members from
> original parse tree and then those added programatically.
When we parse the project in VS we have a strange problem. Method
TypeBuilder.GetFields() retrieves members in reversed order. It occurs in
consequence of adding of class members into additional_decls, and most
likely they are stored in reverse order.
As a result, macro [Record] generate constructors with a reversed
arrangement of parameters.
More information about the devel-en
mailing list