Skip to content

PrimaryExpression and UnaryExpression are not decomposed #409

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions