good first issuerefactor
Repository metrics
- Stars
- (346 stars)
- PR merge metrics
- (PR metrics pending)
Description
ast defines TIdTable type that is used in several parts of the semantic pass. Type defined as follows:
TIdPair* = object
key*: PIdObj
val*: RootRef
TIdPairSeq* = seq[TIdPair]
TIdTable* = object # the same as table[PIdent] of PObject
counter*: int
data*: TIdPairSeq
All the uses of the val: RootRef field are either converted to PType or PSym (result = PType(idTableGet(c.bindings, t)) etc.). This means RootRef can be easily replaced with
type
PSymOrTyp = object
case isSym*: bool
of true:
sym*: PSym
of false:
typ*: PType
This would not create any functional difference, but will clean up the code a little.