Skip to content

feat: Add binary tree functions.#60

Merged
ianlewis merged 9 commits intomainfrom
51-parserrotateleft-is-unintuitive
Sep 20, 2024
Merged

feat: Add binary tree functions.#60
ianlewis merged 9 commits intomainfrom
51-parserrotateleft-is-unintuitive

Conversation

@ianlewis
Copy link
Copy Markdown
Owner

Adds binary tree utility functions for dealing with binary syntax trees.

Fixes #51

Adds binary tree utility functions for dealing with binary syntax trees.

Fixes #51

Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
@ianlewis ianlewis linked an issue Sep 17, 2024 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.68%. Comparing base (5233de2) to head (9386407).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
+ Coverage   88.46%   90.68%   +2.22%     
==========================================
  Files           3        3              
  Lines         338      365      +27     
==========================================
+ Hits          299      331      +32     
+ Misses         25       22       -3     
+ Partials       14       12       -2     
Files with missing lines Coverage Δ
parser.go 93.46% <100.00%> (+3.78%) ⬆️

... and 1 file with indirect coverage changes

@ianlewis ianlewis force-pushed the 51-parserrotateleft-is-unintuitive branch from 1e0c6d4 to 9fd0d05 Compare September 18, 2024 10:22
Adds binary tree utility functions for dealing with binary syntax trees.

Fixes #51

Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
@ianlewis ianlewis force-pushed the 51-parserrotateleft-is-unintuitive branch from 9fd0d05 to 915cef0 Compare September 18, 2024 10:23
@ianlewis
Copy link
Copy Markdown
Owner Author

@superfrink I implemented some binary tree functions including rotations. This should hopefully make some use cases for parsing simpler, like the infix calculator.

@superfrink
Copy link
Copy Markdown
Contributor

This error is not used anymore

var ErrMissingRequiredNode = errors.New("missing required node")

@superfrink
Copy link
Copy Markdown
Contributor

Small increase in test coverage in superfrink@5e3df2c

…ve' into 51-parserrotateleft-is-unintuitive

Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
…uitive' into 51-parserrotateleft-is-unintuitive
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
@ianlewis
Copy link
Copy Markdown
Owner Author

This error is not used anymore

var ErrMissingRequiredNode = errors.New("missing required node")

Removed.

@ianlewis
Copy link
Copy Markdown
Owner Author

Small increase in test coverage in superfrink@5e3df2c

I merged this in. Small change is that I renamed the functions to TestNode_... since they are methods on the Node struct.

Copy link
Copy Markdown
Contributor

@superfrink superfrink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. 👍

@ianlewis ianlewis merged commit 3c48c53 into main Sep 20, 2024
@ianlewis ianlewis deleted the 51-parserrotateleft-is-unintuitive branch October 10, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parser.RotateLeft is unintuitive

3 participants