Prototype of an incremental Cobol compiler front-end for IBM Enterprise Cobol 5.1 for zOS syntax.This prototype is a work in progress and is currently written in C#.
The only real usage of VariableWriter is in WriteTypeConsistencyChecker.
The job done in WriteTypeConsistencyChecker is to check if typed variable is written by an incompatible type.
The VariableWriter interface is a a mess to understand as you get an object as a sending element.
And looking at all implementations, it's impossible to guess the real type of "object".
So better create a new interface dedicated to WriteTypeConsistencyChecker.
Something like:
List<ReceivingStorageArea, List> TypeWritten
Or
List<Variable, List> TypeWritten
ISearchableReadOnlyList : Remove count in method GetEnumerator and remove unused method ConvertAll
count in GetEnumerator was always with magic value -1 which means use the "Count" of this list. ISearchCleanup.txt
Perf improvement : Replace ImmutableList with simple ReadOnlyList