roc/test/snapshots/expr/string_interpolation_simple.md
2025-10-16 07:00:23 -07:00

868 B

META

description=Simple string interpolation
type=expr

SOURCE

"Hello ${name}!"

EXPECTED

UNDEFINED VARIABLE - string_interpolation_simple.md:1:10:1:14

PROBLEMS

UNDEFINED VARIABLE Nothing is named name in this scope. Is there an import or exposing missing up-top?

string_interpolation_simple.md:1:10:1:14:

"Hello ${name}!"
     ^^^^

TOKENS

StringStart,StringPart,OpenStringInterpolation,LowerIdent,CloseStringInterpolation,StringPart,StringEnd,
EndOfFile,

PARSE

(e-string
	(e-string-part (raw "Hello "))
	(e-ident (raw "name"))
	(e-string-part (raw "!")))

FORMATTED

NO CHANGE

CANONICALIZE

(e-string
	(e-literal (string "Hello "))
	(e-runtime-error (tag "ident_not_in_scope"))
	(e-literal (string "!")))

TYPES

(expr (type "Error"))