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: refactor parser #1625

Merged
merged 3 commits into from
Oct 17, 2024
Merged

refactor: refactor parser #1625

merged 3 commits into from
Oct 17, 2024

Conversation

He1pa
Copy link
Contributor

@He1pa He1pa commented Sep 5, 2024

refactor: refactor parser.

  1. remove pkg in module
  2. Parser traversal import files from dfs to bfs
  3. s/parse_file/parse_single_file

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

parser

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y Parser traversal import files from dfs to bfs

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

@coveralls
Copy link
Collaborator

coveralls commented Sep 23, 2024

Pull Request Test Coverage Report for Build 11382008481

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 572 of 626 (91.37%) changed or added relevant lines in 12 files are covered.
  • 108 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.07%) to 70.464%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/runner/src/lib.rs 0 1 0.0%
kclvm/parser/src/lib.rs 471 491 95.93%
kclvm/parser/src/file_graph.rs 81 114 71.05%
Files with Coverage Reduction New Missed Lines %
kclvm/parser/src/lib.rs 1 96.1%
kclvm/tools/src/LSP/src/request.rs 3 64.97%
kclvm/tools/src/LSP/src/semantic_token.rs 4 90.99%
kclvm/tools/src/LSP/src/dispatcher.rs 7 65.71%
kclvm/sema/src/advanced_resolver/node.rs 17 84.75%
kclvm/tools/src/LSP/src/state.rs 19 81.14%
kclvm/runtime/src/crypto/mod.rs 57 3.31%
Totals Coverage Status
Change from base Build 11329256193: -0.07%
Covered Lines: 51682
Relevant Lines: 73345

💛 - Coveralls

@He1pa He1pa added parser Issues or PRs related to kcl parser refactor labels Sep 23, 2024
@He1pa He1pa force-pushed the refactor_parser branch 5 times, most recently from 8263f7d to 1dede3e Compare September 25, 2024 04:05
@He1pa He1pa force-pushed the refactor_parser branch 2 times, most recently from a800d91 to 1cab9f4 Compare October 15, 2024 03:50
@He1pa He1pa changed the title [wip]refactor: refactor parser. parse kcl project by separate file refactor: refactor parser Oct 15, 2024
@He1pa He1pa marked this pull request as ready for review October 15, 2024 03:56
@He1pa He1pa marked this pull request as draft October 15, 2024 07:09
@He1pa He1pa marked this pull request as ready for review October 15, 2024 09:42
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/file_graph.rs Outdated Show resolved Hide resolved
kclvm/parser/src/file_graph.rs Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
kclvm/parser/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Peefy Peefy left a comment

Choose a reason for hiding this comment

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

Good Job! LGTM

@Peefy Peefy merged commit b22e5ec into kcl-lang:main Oct 17, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Issues or PRs related to kcl parser refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants