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

UoM types in AST, unnamed annotations, and syntax for importing from std #5324

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

nrc
Copy link
Contributor

@nrc nrc commented Feb 10, 2025

This is preparatory work for declaring std using KCL (extracted from #5147).

Numeric suffixes are now preserved in the AST, but we still don't actually have any effect. (But it means formatting the AST won't drop them, etc).

@nrc nrc requested a review from adamchalmers February 10, 2025 19:09
Copy link

qa-wolf bot commented Feb 10, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Feb 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 10, 2025 7:20pm

@nrc
Copy link
Contributor Author

nrc commented Feb 10, 2025

This PR also fixes a few bugs/omissions:

  • accept empty bodies for functions
  • accept std lib names as identifiers
  • some bugs around sending scene units to the engine for isolated executions

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 63.55685% with 125 lines in your changes missing coverage. Please review.

Project coverage is 85.89%. Comparing base (74bdb72) to head (db32de1).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/parsing/ast/types/mod.rs 54.44% 41 Missing ⚠️
src/wasm-lib/kcl/src/parsing/parser.rs 66.30% 31 Missing ⚠️
src/wasm-lib/kcl/src/execution/mod.rs 62.50% 21 Missing ⚠️
src/wasm-lib/kcl/src/execution/exec_ast.rs 74.32% 19 Missing ⚠️
src/wasm-lib/kcl/src/parsing/token/mod.rs 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5324      +/-   ##
==========================================
- Coverage   86.04%   85.89%   -0.15%     
==========================================
  Files          92       92              
  Lines       33261    33456     +195     
==========================================
+ Hits        28620    28738     +118     
- Misses       4641     4718      +77     
Flag Coverage Δ
wasm-lib 85.89% <63.55%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@nrc nrc merged commit 9c18060 into main Feb 10, 2025
35 of 37 checks passed
@nrc nrc deleted the nrc-std-base branch February 10, 2025 22:26
@jtran jtran mentioned this pull request Feb 11, 2025
mattmundell added a commit to mattmundell/modeling-app that referenced this pull request Feb 11, 2025
jtran added a commit that referenced this pull request Feb 13, 2025
* CM KCL: add annotations

* Make AnnotationName a token that includes the @

* The text of AnnotationName is now optional (#5324)

---------

Co-authored-by: Matt Mundell <[email protected]>
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