MessageTemplate parse() {
            while (!eof()) {
                consumeWhile(c -> c != '@');
                // '@' followed by '@' is an escaped '@", so keep parsing
                // the marked literal if that's the case.
                if (peek(1) == '@') {
                    skip(); // consume the first @.
                    addLiteralPartIfNecessary();
                    skip(); // skip the escaped @.
                    mark++;
                } else if (!eof()) {
                    addLiteralPartIfNecessary();
                    List<String> path = AttributeValue.parseScopedAttribute(this);
                    parts.add(attributeValue -> attributeValue.getPath(path).toMessageString());
                    mark = position();
                }
            }

            addLiteralPartIfNecessary();
            return new MessageTemplate(input(), parts);
        }
Parses message templates by slicing out literals and scoped attribute selectors.

<p>Two "@" characters in a row (@@) are considered a single "@" because the
first "@" acts as an escape character for the second.
smithy-model/src/main/java/software/amazon/smithy/model/validation/linters/EmitEachSelectorValidator.java