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

Fix handling of "\" escape character in identifier names #41540

Merged

Conversation

poorna2152
Copy link
Contributor

@poorna2152 poorna2152 commented Oct 19, 2023

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #41507
Fixes #41635

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

Note that unescaping more than once would break the code for some scenarios.
e.g. consider: a\\3. (Here user intends to escape the backslash using backslash)
After first unescape: a\3 (Correct)
After second unescape a3 (Wrong)
After third unescape a3 (Wrong)

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@LakshanWeerasinghe LakshanWeerasinghe added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/Parser Everything related to the ballerina lexer and the parser #Compiler labels Oct 19, 2023
@poorna2152 poorna2152 force-pushed the escape_char branch 4 times, most recently from 8c1e270 to 2491ece Compare November 7, 2023 02:07
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (identifier_unescaping@3dadeb5). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...lang/compiler/semantics/analyzer/CodeAnalyzer.java 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##             identifier_unescaping   #41540   +/-   ##
========================================================
  Coverage                         ?   77.51%           
  Complexity                       ?    58584           
========================================================
  Files                            ?     3438           
  Lines                            ?   219217           
  Branches                         ?    28922           
========================================================
  Hits                             ?   169917           
  Misses                           ?    39886           
  Partials                         ?     9414           

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

Copy link

github-actions bot commented Dec 7, 2023

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Dec 7, 2023
@poorna2152 poorna2152 removed the Stale label Dec 8, 2023
Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

Copy link

github-actions bot commented Jan 8, 2024

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Jan 8, 2024
@lochana-chathura lochana-chathura added this to the 2201.9.0 milestone Jan 9, 2024
Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Aug 11, 2024
Copy link

Closed PR due to inactivity for more than 18 days.

@github-actions github-actions bot closed this Aug 15, 2024
@poorna2152 poorna2152 removed the Stale label Aug 15, 2024
@poorna2152 poorna2152 reopened this Aug 16, 2024
Copy link

github-actions bot commented Sep 1, 2024

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Sep 1, 2024
@poorna2152 poorna2152 removed the Stale label Sep 2, 2024
Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@gimantha gimantha merged commit 3138ef2 into ballerina-platform:identifier_unescaping Sep 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Parser Everything related to the ballerina lexer and the parser #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: "\" escape in identifer not working as expected
5 participants