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

refactor type declarations for nodes #215

Merged
merged 2 commits into from
Sep 6, 2022
Merged

refactor type declarations for nodes #215

merged 2 commits into from
Sep 6, 2022

Conversation

marihachi
Copy link
Contributor

@marihachi marihachi commented Sep 5, 2022

What

ノードのグループをCSTとASTの2種類に変更。

より一般的な名前に変更。

  • Ast → Cst
  • N → Ast

型宣言の機能: 関連ノードの宣言変更とCST/ASTノードへの統合。

今までTypeSourceはノードとは別物として扱っていたが、普通のノードと同様に扱うようにする。

  • fnノード: プロパティ名 args[].type → args[].argType
  • fnノード: プロパティ名 ret → retType
  • TypeSourceのnamedノード: ノード名 named → namedTypeSource
  • TypeSourceのfnノード: ノード名 fn → fnTypeSource

Why

ノードの型宣言の改善のため。

Additional info (optional)

@codecov
Copy link

codecov bot commented Sep 5, 2022

Codecov Report

Base: 86.47% // Head: 86.53% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (a8355d1) compared to base (ae197be).
Patch coverage: 95.80% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
+ Coverage   86.47%   86.53%   +0.05%     
==========================================
  Files          19       19              
  Lines        2758     2770      +12     
  Branches      430      430              
==========================================
+ Hits         2385     2397      +12     
  Misses        366      366              
  Partials        7        7              
Impacted Files Coverage Δ
src/type.ts 52.25% <44.44%> (-4.97%) ⬇️
src/interpreter/index.ts 90.25% <88.88%> (ø)
src/index.ts 100.00% <100.00%> (ø)
src/node.ts 97.67% <100.00%> (+0.13%) ⬆️
src/parser/index.ts 82.95% <100.00%> (ø)
src/parser/node.ts 99.00% <100.00%> (+0.04%) ⬆️
src/parser/plugins/infix-to-fncall.ts 98.34% <100.00%> (ø)
src/parser/plugins/set-attribute.ts 81.25% <100.00%> (ø)
src/parser/plugins/transform-chain.ts 94.87% <100.00%> (ø)
src/parser/plugins/validate-keyword.ts 97.61% <100.00%> (ø)
... and 2 more

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.

@syuilo syuilo merged commit 77f0e36 into master Sep 6, 2022
@syuilo
Copy link
Collaborator

syuilo commented Sep 6, 2022

🙏🏻

@syuilo syuilo deleted the work/refactor-node-2 branch September 6, 2022 11:57
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