Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented "+" and "-" operators #25

Merged
merged 9 commits into from
Nov 27, 2024
Merged

Conversation

ascandone
Copy link
Contributor

@ascandone ascandone commented Nov 25, 2024

NOTE: auto-merge is on

PR can be looked at commit by commit

"+" and "-" specs:

  • is defined for numbers (including negative numbers)
  • is defined for monetaries of the same asset
  • left and right operand need to have the same type, there is currently no form of implicit casting

@ascandone ascandone requested review from altitude and gfyrag November 25, 2024 10:34
@ascandone ascandone force-pushed the feat/add-infix-operators branch from 1cb7741 to bd4b15b Compare November 26, 2024 11:10
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 79.82196% with 204 lines in your changes missing coverage. Please review.

Project coverage is 63.33%. Comparing base (f6d4e75) to head (b959dc3).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
internal/parser/antlr/numscript_parser.go 72.89% 137 Missing and 8 partials ⚠️
internal/interpreter/evaluate_expr.go 82.75% 12 Missing and 3 partials ⚠️
internal/interpreter/infix.go 67.39% 11 Missing and 4 partials ⚠️
internal/parser/ast.go 0.00% 9 Missing ⚠️
internal/parser/antlr/numscript_base_listener.go 0.00% 8 Missing ⚠️
internal/interpreter/value.go 87.23% 4 Missing and 2 partials ⚠️
internal/analysis/hover.go 85.18% 3 Missing and 1 partial ⚠️
internal/analysis/check.go 96.66% 1 Missing ⚠️
internal/parser/parser.go 97.56% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   63.27%   63.33%   +0.05%     
==========================================
  Files          28       29       +1     
  Lines        6217     6395     +178     
==========================================
+ Hits         3934     4050     +116     
- Misses       2115     2167      +52     
- Partials      168      178      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ascandone ascandone force-pushed the feat/add-infix-operators branch from bd4b15b to b0d00e9 Compare November 27, 2024 11:33
@ascandone ascandone enabled auto-merge (rebase) November 27, 2024 14:30
@ascandone ascandone merged commit 661c6a1 into main Nov 27, 2024
5 checks passed
@ascandone ascandone deleted the feat/add-infix-operators branch November 27, 2024 14:43
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.

2 participants