libdparse
libdparse copied to clipboard
PrimaryExpression and UnaryExpression are not decomposed
PrimaryExpression and UnaryExpression are not decomposed and this has a negative impact on the amount of memory used.
UnaryExpression should be
class UnaryExpression : AstNode
{
Expression exp;
}
and then
class PrefixExpression : UnaryExpression {}
class PreIncrementExpression : PrefixExpression {}
class PreDecrementExpression : PrefixExpression {}
class AtExpression : PrefixExpression {}
class DereferenceExpression : PrefixExpression {}
class PostfixExpression : UnaryExpression {}
class IndexExpression : PostfixExpression {}
class DotExpression : PostfixExpression {}
/**\ ETC \**/
For example a.b.c takes almost 3 kB of memory.
this is one of my primary things that concern me about the current API layout, let's try to get this in before a 1.0.0 release!