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

quick fixes for some compile errors using ast #1369

Merged
merged 1 commit into from
May 27, 2024

Conversation

shashank-iitbhu
Copy link
Contributor

@shashank-iitbhu shashank-iitbhu commented May 27, 2024

1. Does this PR affect any open issues?(Y/N) and add issue references:

  • N
  • Y

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

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

  • fixed range for some compile errors using ast by removing the redundant code of modifying the fix range.
  • introduced new variables to store the end position span of the previous target or keyword.
data = {key1 = "value1", key2 = "value2"}
dataKeys2 = {k: k for k, v, k in data}

will be fixed as

data = {key1 = "value1", key2 = "value2"}
dataKeys2 = {k: k for k, v in data}
protocol Person:
    firstName: str
    lastName: str
    fullName?: str

will be fixed as

protocol PersonProtocol:
    firstName: str
    lastName: str
    fullName?: str
import .model1

model1?.CatalogItem

will be fixed as

import .model1

model1.CatalogItem

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

  • N
  • Y

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

Signed-off-by: Shashank Mittal <shashank.mittal.mec22@itbhu.ac.in>
@coveralls
Copy link
Collaborator

coveralls commented May 27, 2024

Pull Request Test Coverage Report for Build 9259777289

Details

  • 14 of 20 (70.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 71.094%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/sema/src/resolver/arg.rs 7 8 87.5%
kclvm/sema/src/resolver/node.rs 7 8 87.5%
kclvm/sema/src/resolver/global.rs 0 4 0.0%
Totals Coverage Status
Change from base Build 9257274118: -0.002%
Covered Lines: 54059
Relevant Lines: 76039

💛 - Coveralls

@Peefy Peefy merged commit 73ac29c into kcl-lang:main May 27, 2024
9 of 10 checks passed
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.

3 participants