Skip to content

spec_parser: check next_token if not expecting next token#49408

Merged
alalazo merged 1 commit intodevelopfrom
hs/fix/parser-simplifications
Mar 12, 2025
Merged

spec_parser: check next_token if not expecting next token#49408
alalazo merged 1 commit intodevelopfrom
hs/fix/parser-simplifications

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Mar 11, 2025

  • avoid strip() which casts spack.util.spack_yaml.syaml_str -> str, making
    it impossible to issue parser warnings with useful origin.
  • if no next token is expected, then check if no next token is present :)
  • do not print whitespace string on new line in case no specs are parsed

@spackbot-app spackbot-app bot added the core PR affects Spack core functionality label Mar 11, 2025
@haampie haampie force-pushed the hs/fix/parser-simplifications branch from 06eda81 to 84e50a5 Compare March 11, 2025 10:04
@spackbot-app spackbot-app bot added the tests General test capability(ies) label Mar 11, 2025
@haampie haampie force-pushed the hs/fix/parser-simplifications branch from 84e50a5 to 2ce0528 Compare March 11, 2025 10:05
@alalazo alalazo self-assigned this Mar 12, 2025
@alalazo alalazo merged commit db7ab98 into develop Mar 12, 2025
37 checks passed
@alalazo alalazo deleted the hs/fix/parser-simplifications branch March 12, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants