massimiliano-mantione/metascript — pull request #38 by drslump (2014-06-15 01:27:54+00:00)
Title: string literals refactor

# Overview

- `'` strings are verbatim, multiline get trimmed until the first newline
- `"` strings support escaping, multiline get trimmed and folded
- Multiline strings are started using 3 o more quotes and end when the same number of quotes are found
- Literate multistrings are still supported, when it appears as the first expression in a file it's stored in the *doc* annotation of the root block.
- All strings are annotated with the name *quote* and the delimiter used as value (might be helpful for macros)

# Explanation

The reasoning for making the single quoted strings verbatim is to enable macros for *embedded languages*, like we discussed on https://github.com/massimiliano-mantione/metascript/pull/22

The change of behaviour for multiline strings from a *perlish* heredoc syntax (EOT at the start of a line) for a more pythonish approach, is mainly driven to allow these strings without breaking the indentation layout of the file. If the proposed change of matching the same amount of quotes to detect the end is not considered valid, perhaps I could try to introduce again the EOT symbol handling but lifting the requirement for it to be at the start of the line.