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

Additional support for string literals #202

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

MattEdwardsWaggleBee
Copy link
Contributor

This does a combination of options from #194

  • Allows backticks as a quote type
  • Allows custom quote types (might not be worth it, I can delete those parts)
  • Makes ReadQuotedString public so developers can inherit and create custom string literals

@sebastienros sebastienros merged commit 9888d82 into sebastienros:main Feb 18, 2025
1 check passed
@sebastienros
Copy link
Owner

sebastienros commented Feb 18, 2025

Note that eventually it should expose more useful sets of expressions like CSharpString, JavaScripString, SQLString ... since they actually have different logic for escaping and that's probably what we want when parsing quoted text. For instance single quoted strings in JS use \' to escape the single quote, while in yaml and sql it's ''. Could also handle multi-line parsing, like the """ in c# or ``---` in JS.

Probably in a custom Parsers sections or extensions with predefined schemes. I think Irony has such things.

@MattEdwardsWaggleBee
Copy link
Contributor Author

MattEdwardsWaggleBee commented Feb 19, 2025

I'll give that some thought. I know @bfarmer67 has been considering multiple line strings and comment blocks too.

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