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

feat: Implement multiline string literals in metadata. #121

Merged
merged 4 commits into from
May 29, 2024

Conversation

wxsBSD
Copy link
Contributor

@wxsBSD wxsBSD commented May 22, 2024

This commit implements multiline string literals in metadata section.

rule a {
  meta:
    a = """
I'm a multiline string literal!

Hooray!

\"test\"

I also handle escapes, \x41\x42\x43!

... and emojis 🤖!
"""
  condition:
    true
}

While I'm here, also quote the metadata string values when printing the ast.

This commit implements multiline string literals in metadata section.

```
rule a {
  meta:
    a = """
I'm a multiline string literal!

Hooray!

\"test\"

I also handle escapes, \x41\x42\x43!

... and emojis 🤖!
"""
  condition:
    true
}
```

While I'm here, also quote the metadata string values when printing the ast.
@wxsBSD wxsBSD changed the title Implement multiline string literals in metadata. feat: Implement multiline string literals in metadata. May 22, 2024
@plusvic plusvic enabled auto-merge (squash) May 29, 2024 08:32
@plusvic plusvic merged commit afe7266 into VirusTotal:main May 29, 2024
15 checks passed
@wxsBSD wxsBSD deleted the multiline_strings branch May 29, 2024 20:24
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