Files
mgmt/lang/interpret_test/TestAstFunc2/escaping1.output
Joe Groocock b9741e87bd lang: interpolate: Fix string interpolation of dollar symbols
Dollar symbols were failing to parse when not followed by a non-brace,
non-dollar, non-EOF token and causing expected tests to fail. This
simplifies the rules to allow the remaining tests to succeed.

Fix and reinstate the final few failing tests, and add another.

Allow any escape sequence to be matched so that invalid sequences
produce a meaningful error message instead of a generic "cannot parse":

    ast: interpolate: interpolating: V: \?
    unhandled escape sequence token: \?

Tidy the related Makefile rule for generating the ragel parser.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-09-28 21:40:49 +00:00

27 lines
694 B
Plaintext

Vertex: test[A: ${test}]
Vertex: test[B: $]
Vertex: test[C: This is c1]
Vertex: test[D: \$]
Vertex: test[E: {}]
Vertex: test[F: hello]
Vertex: test[G: This is g1 EOF]
Vertex: test[H: {hhh} EOF]
Vertex: test[I: This is ii EOF]
Vertex: test[J: $ is a dollar sign]
Vertex: test[K: $ {zzz} EOF]
Vertex: test[L: $$This is l1 EOF]
Vertex: test[M: $ $$]
Vertex: test[N: hello " world]
Vertex: test[O: hello "" world]
Vertex: test[P: hello \ world]
Vertex: test[Q: hello \\ world]
Vertex: test[R: \This is r1 EOF]
Vertex: test[S: \$ EOF]
Vertex: test[T: newline
EOF]
Vertex: test[U: tab \ tabEOF]
Vertex: test[W: \$]
Vertex: test[X: $This is x1 EOF]
Vertex: test[Y: ${unused} EOF]
Vertex: test[Z: $$$]