flux icon indicating copy to clipboard operation
flux copied to clipboard

Add multi-line unescaped strings to parser

Open pauldix opened this issue 7 years ago • 1 comments

Should we add multi-line unescaped strings to the parser? I found this pretty useful in my work to add a fromProm function for querying Prometheus. I could specify a whole raw query to Prometheus without escaping anything. I used backtick as the start and stop character.

Thoughts @nathanielc

pauldix avatar Aug 04 '18 20:08 pauldix

I believe the spec allows for newlines inside plain double quoted strings:

string_lit = `"` { unicode_value | byte_value | StringExpression | newline } `"` .

https://github.com/influxdata/platform/blob/master/query/docs/SPEC.md#string-literals

mark-rushakoff avatar Aug 05 '18 04:08 mark-rushakoff