Skip to content

Conversation

iancaffey
Copy link

@iancaffey iancaffey commented Sep 10, 2025

Issue #, if available:

#22

Description of changes:

The grammar for struct field names is currently pretty broken (it doesn't properly parse any style of Q-string that have escaped characters, spaces, or line delimiters), but one of the easiest fixes right now is to properly support spaces as key characters.

Before

'abc def'

would parse into the following tokens when parsing the KEY,

  • KEY_NAME(abc)
  • PsiWhiteSpace
  • KEY_NAME(def)

due to the regex for KeyCharacter not permitting spaces.

After

It parses into a single KEY_NAME(abc def) token.

The entire parsing of struct field names long-term needs some significant overhaul, but trying to keep the scope of this PR pretty small.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@iancaffey iancaffey closed this Sep 10, 2025
@iancaffey iancaffey deleted the key-identifier-parsing branch September 10, 2025 17:15
@iancaffey iancaffey restored the key-identifier-parsing branch September 10, 2025 17:16
@iancaffey iancaffey reopened this Sep 10, 2025
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