Herb-AI / HerbGrammar.jl

Grammars for Herb.jl
https://herb-ai.github.io/
MIT License
0 stars 2 forks source link

Allow `insert!`ion of `AbstractRuleNode`s #76

Closed ReubenJ closed 4 months ago

ReubenJ commented 4 months ago

Currently, restricting to concrete RuleNodes restricts the user from inserting a Hole, for example.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 46.10%. Comparing base (aca61f9) to head (0f92127).

Files Patch % Lines
src/nodelocation.jl 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #76 +/- ## ======================================= Coverage 46.10% 46.10% ======================================= Files 8 8 Lines 462 462 ======================================= Hits 213 213 Misses 249 249 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

THinnerichs commented 4 months ago

As @nicolaefilat said: Your change is valid. However, with the current implementation you cannot substitute the entire tree with a hole, if I am not mistaken. This would be possible when constricting to RuleNodes specifically.

ReubenJ commented 4 months ago

This is missing a test, which, if we had it, would show that Holes do not have an ind field. Add a new method for Holes instead.

ReubenJ commented 4 months ago

Closing in favor of releasing on v0.2.x branch