@Override
        public Node stringNode(StringNode node) {
            // TODO: Update this to make a single pass over the string rather than use multiple regular expressions.
            Matcher matcher = INLINE.matcher(node.getValue());
            StringBuffer builder = new StringBuffer();

            while (matcher.find()) {
                String variable = matcher.group(1);
                String replacement = expand(node.getSourceLocation(), variable);
                // INLINE over-matches to allow for escaping. If the over-matched first group does not start with
                // '${', we need to prepend the first character from that group on the replacement.
                if (!matcher.group(0).startsWith("${")) {
                    replacement = matcher.group(0).charAt(0) + replacement;
                }
                matcher.appendReplacement(builder, replacement);
            }

            matcher.appendTail(builder);

            // Remove escaped variables.
            String result = ESCAPED_INLINE.matcher(builder.toString()).replaceAll("\\$");

            return new StringNode(result, node.getSourceLocation());
        }
Expands ${NAME} values inside of strings to a {@code System} property
or an environment variable.
smithy-build/src/main/java/software/amazon/smithy/build/model/SmithyBuildUtils.java