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

[p4-constraints] Allow C++ compliant multi-line strings. #143

Merged
merged 1 commit into from
May 3, 2024

Conversation

jonathan-dilorenzo
Copy link
Collaborator

[p4-constraints] Allow C++ compliant multi-line strings.

I.e. strings like:

  "This is the start of my string "
  "and this is the end."

This will help solve a C++ preprocessor issue we're having where it will randomly insert preprocessor directives into the @entry_restriction annotation string when using a single multi-line string.

@jonathan-dilorenzo
Copy link
Collaborator Author

This is a workaround to a combination of p4lang/p4c#2333 and an issue where the C++ preprocessor inserts line directives into our original workaround (making everything one big, single string).

smolkaj
smolkaj previously approved these changes May 3, 2024
Copy link
Member

@smolkaj smolkaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I.e. strings like:
```
  "This is the start of my string "
  "and this is the end."
```

This will help solve a C++ preprocessor issue we're having where it will randomly insert preprocessor directives into the `@entry_restriction` annotation string when using a single multi-line string.

PiperOrigin-RevId: 628166543
@jonathan-dilorenzo jonathan-dilorenzo merged commit 5371b09 into master May 3, 2024
3 checks passed
@jonathan-dilorenzo jonathan-dilorenzo deleted the cl/628166543 branch May 3, 2024 19:40
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