Skip to content

Treat executable statements at file scope as syntax errors - #37

Merged
saidctb merged 5 commits into
mainfrom
codex/review-fortran-parser-behavior
May 31, 2026
Merged

Treat executable statements at file scope as syntax errors#37
saidctb merged 5 commits into
mainfrom
codex/review-fortran-parser-behavior

Conversation

@saidctb

@saidctb saidctb commented May 27, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Enforce stricter Fortran syntax by preventing executable statements at file scope from being silently skipped so that such lines produce a clear syntax error.

Description

  • Remove the branch that silently continued on self._is_executable_statement_start(stripped) in file-scope parsing so that executable-statement starts now fall through to _raise_invalid_fortran_syntax_line.

Testing

  • Ran the test suite using pytest -q and all tests completed successfully.

Codex Task

@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.23404% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
c_parser/parser.py 83.78% 3 Missing and 3 partials ⚠️
Flag Coverage Δ
py312 94.21% <87.23%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
c_parser/models.py 98.14% <100.00%> (ø)
x2py/cli.py 99.46% <100.00%> (+<0.01%) ⬆️
c_parser/parser.py 89.84% <83.78%> (-0.62%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@saidctb
saidctb merged commit 358b872 into main May 31, 2026
4 of 5 checks passed
@saidctb
saidctb deleted the codex/review-fortran-parser-behavior branch May 31, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant