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

Expose utils for expression LSP #117

Merged
merged 5 commits into from
Jan 23, 2023
Merged

Expose utils for expression LSP #117

merged 5 commits into from
Jan 23, 2023

Conversation

adierkens
Copy link
Member

@adierkens adierkens commented Jan 3, 2023

Release Notes

  • Expose parseExpression from the expression parser
  • Adds a strict flag to parseExpression that will (when disabled) attach any parsing errors to the top-level node instead of throwing

@adierkens
Copy link
Member Author

/canary

@adierkens
Copy link
Member Author

/canary

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 79.07% // Head: 79.10% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (9966c1e) compared to base (9f1c118).
Patch coverage: 80.95% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
+ Coverage   79.07%   79.10%   +0.03%     
==========================================
  Files         132      132              
  Lines        4655     4662       +7     
  Branches     1164     1167       +3     
==========================================
+ Hits         3681     3688       +7     
  Misses        688      688              
  Partials      286      286              
Impacted Files Coverage Δ
core/player/src/expressions/types.ts 100.00% <ø> (ø)
core/player/src/expressions/parser.ts 80.17% <80.00%> (+0.41%) ⬆️
core/player/src/expressions/evaluator.ts 80.12% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@adierkens adierkens marked this pull request as ready for review January 23, 2023 00:48
@adierkens adierkens requested a review from KetanReddy as a code owner January 23, 2023 00:48

// Expressions can be separated by semicolons, commas, or just inferred without any
// separators
if (chIndex === SEMCOL_CODE || chIndex === COMMA_CODE) {
Copy link
Member

Choose a reason for hiding this comment

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

Would there be any worth to having the kind of characters that are ignored be configurable?

Copy link
Member Author

Choose a reason for hiding this comment

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

That may make it pretty difficult to define a proper bnf grammar for expressions. But that might be worth considering as a future change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants