ktye / i

interpret
100 stars 17 forks source link

Should use argument `p`? #37

Closed gitonthescene closed 1 year ago

gitonthescene commented 1 year ago

Should the upper case P here be lower case?

ktye commented 1 year ago

yes, it's called with global P so they are the same, but lowercase was intended

gitonthescene commented 1 year ago

Okay. Also, on that same compile page, when I click on asn.k I download what looks like the tree for some other script than what's being displayed on the web site. I was expecting to see the original code which parsed as the tree given. Is there some other way to see the code which results in the displayed parse tree?

ktye commented 1 year ago

the links "asn.k" "cnd.k" "k.k" etc store the tree as a k file. T P I S are the columns of the table. for asn.k, T should be `prg and S is `asn.

the tables are converted form go, see https://github.com/ktye/i/tree/master/x/tests

gitonthescene commented 1 year ago

I sort of see but asn.k has 29 elements in its parent vector but the tree displayed has only 3: C527D290-067A-470A-B487-74FFA84796A4 It does say there are 29 nodes though. Perhaps this is a rendering problem on iPhone Safari? Actually it looks the same for Chrome and Brave.

So the 29 nodes are from parsing this source? I thought that was the output, like asn.js or asn.c.

ktye commented 1 year ago

the function nodes are collapsed, double-click to open. (that should be written on the bottom of the tree)

gitonthescene commented 1 year ago

I see that now. Thanks. I can collapse/uncollapse just fine. Reviewing the text I see no mention of how these trees were generated. Might it be worth a mention? Or is that not the point here.

I did spot a small typo as well as another when searching the source.