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

Context-dependent parsing of switch word #45

Merged
merged 10 commits into from
Jun 3, 2021
Merged

Context-dependent parsing of switch word #45

merged 10 commits into from
Jun 3, 2021

Conversation

magicant
Copy link
Owner

@magicant magicant commented May 30, 2021

This PR follows up #44.

  • Define WordContext and WordLexer
  • Move relevant functions from Lexer to WordLexer
  • Parse tilde expansion depending on context
  • Parse Single-quotes depending on context
  • Allow escaping } depending on context
  • Update documentation
  • (Refactor)

unit word ${x-word} "text" "${x-text}"
Tilde Special Special Literal Literal
Single quotes Special Special Literal Literal
Double quotes Special Special Special Special
\\ Special Special Special Special
\" Special Special Special Special
\} Special Special Literal Special
\{ Special Special Literal Literal

@magicant magicant self-assigned this May 30, 2021
@magicant magicant marked this pull request as ready for review June 3, 2021 14:13
@magicant magicant merged commit e7e0c3a into master Jun 3, 2021
@magicant magicant deleted the switch_context branch June 3, 2021 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant