You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently TypeFactory has a lot of static fields like INTEGER, INTEGER_PRIMITIVE, etc. But because any object cannot appear in AST twice, it's often requred to write code like
when constructring some AST from stratch, i. e. just clone a constant. (And it's very easy to forget to do that.)
I suggest to add factory methods like TypeFactory.integer(), TypeFactory.integerPrimitive() which create a unique object referencing Integer, int, etc.
The text was updated successfully, but these errors were encountered:
Currently TypeFactory has a lot of static fields like
INTEGER
,INTEGER_PRIMITIVE
, etc. But because any object cannot appear in AST twice, it's often requred to write code likewhen constructring some AST from stratch, i. e. just clone a constant. (And it's very easy to forget to do that.)
I suggest to add factory methods like
TypeFactory.integer()
,TypeFactory.integerPrimitive()
which create a unique object referencingInteger
,int
, etc.The text was updated successfully, but these errors were encountered: