esprima-dotnet
esprima-dotnet copied to clipboard
Implement convenient ToString() methods for nodes and locations
Or use DebuggerDisplay attribute instead. It makes the debug process more clear.
Also, I suggest using the following output line-column based format for Location:
[l,c)- if start position equals to the end position.[l,c1..c2)- if start line equals to the end line, but columns are different.[l1..l2,c)- if start line differs from the end, but columns are the same.[l1,c1..l2,c2)- common format.
And the following for index-based (Roslyn-like):
[i)- if start position equals to the end position.[i1..i2)- includes the first position but excludes the latest one.
I am fine with that. Do you want to create a PR for this?
Yes, I want, but later.
What is the reason for using array ranges int[] Range instead of typed ranges like TextSpan Range where TextSpan consist of Start and Length or Start and Stop fields? I think it's more convenient.