read in all Lines and put them into TamlKeyValuePairs with the level they are intended (number of \t at the start of the line)
in a second pass I first put all with 0 indentation into TamlDocument.KeyValuePairs
if the indentation is larger as the current one I read in a parent value and replaced the Value of the KeyValuePair with a TamlArray and added the Values to the array. All subsequent values are addend to that parent.
All Tests are passing now.
I think I have seen some more opportunities for further unit tests. Some important code paths in my opinion are not covered by them.
Also this PR is based on the branch feature_dotnet
This also makes #26 not allowed because this parser doesn't allow inconstant indentation. There is also no unit test and sensible error handling for this case.
I have the parser rewritten the following way:
TamlKeyValuePair
s with the level they are intended (number of\t
at the start of the line)TamlDocument.KeyValuePairs
TamlArray
and added the Values to the array. All subsequent values are addend to that parent.All Tests are passing now.
I think I have seen some more opportunities for further unit tests. Some important code paths in my opinion are not covered by them.
Also this PR is based on the branch
feature_dotnet
This also makes #26 not allowed because this parser doesn't allow inconstant indentation. There is also no unit test and sensible error handling for this case.
I also annotated some
Nullable
s