Skip to content

Conversation

@wilsong-anl
Copy link
Contributor

Some correct syntax of labeled "if" and "where" statements (things like a label starting with a capital or a space after an "else" in an "if" statement or a labeled "else where") messed up the syntax highlighting. This commit fixes those issues.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.45%. Comparing base (e77b2ec) to head (9758eaf).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1241   +/-   ##
=======================================
  Coverage   81.45%   81.45%           
=======================================
  Files          13       13           
  Lines        2405     2405           
  Branches      196      196           
=======================================
  Hits         1959     1959           
  Misses        441      441           
  Partials        5        5           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gnikit
Copy link
Member

gnikit commented Dec 14, 2025

Do we have some small examples for this that we can add to the tests that the syntax is fixed and guard against regressions?

@wilsong-anl
Copy link
Contributor Author

Here's a small example of what I'd seen:

RType: if (condition_1) then
    continue
else if (condition_2 .or. condition_3) then RType
    continue
else RType ! "RType" was red and comment was white here
    continue ! continue was white here
end if RType
ZType: where (mask_1)
    continue
else where (mask_2) ZType ! "ZType" was red here
    continue
else where ZType ! "ZType" was red here 
    continue
end where ZType

@gnikit
Copy link
Member

gnikit commented Dec 19, 2025

Here's a small example of what I'd seen:

RType: if (condition_1) then
    continue
else if (condition_2 .or. condition_3) then RType
    continue
else RType ! "RType" was red and comment was white here
    continue ! continue was white here
end if RType
ZType: where (mask_1)
    continue
else where (mask_2) ZType ! "ZType" was red here
    continue
else where ZType ! "ZType" was red here 
    continue
end where ZType

Thanks @wilsong-anl will add the test and check locally. I need to think a bit if the complexity in time for the regex changes drastically, but other than that I looks good

… statements

Some correct syntax of labeled "if" and "where" statements messed up the syntax highlighting. This commit fixes those issues.
@gnikit gnikit merged commit 0f272fd into fortran-lang:main Dec 22, 2025
1 check 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.

2 participants