private static ObjectNode parseObjectNode(IdlModelLoader loader, SourceLocation location) {
        IdlInternalTokenizer tokenizer = loader.getTokenizer();
        tokenizer.expect(IdlToken.LBRACE);
        tokenizer.next();
        tokenizer.skipWsAndDocs();
        loader.increaseNestingLevel();
        ObjectNode.Builder builder = ObjectNode.builder().sourceLocation(location);

        while (tokenizer.hasNext()) {
            if (tokenizer.expect(IdlToken.RBRACE, IdlToken.STRING, IdlToken.IDENTIFIER) == IdlToken.RBRACE) {
                break;
            }

            String key = loader.internString(tokenizer.getCurrentTokenStringSlice());
            SourceLocation keyLocation = tokenizer.getCurrentTokenLocation();
            tokenizer.next();
            tokenizer.skipWsAndDocs();
            tokenizer.expect(IdlToken.COLON);
            tokenizer.next();
            tokenizer.skipWsAndDocs();

            Node value = expectAndSkipNode(loader);
            if (builder.hasMember(key)) {
                throw new ModelSyntaxException("Duplicate member: '" + key + '\'', keyLocation);
            }
            builder.withMember(key, value);
            tokenizer.skipWsAndDocs();
        }

        tokenizer.expect(IdlToken.RBRACE);
        tokenizer.next();
        loader.decreaseNestingLevel();
        return builder.build();
    }
Parse a Node identifier String, taking into account keywords and forward references.

@param loader     IDL parser.
@param identifier Identifier to parse.
@param location   Source location to assign to the identifier.
@return Returns the parsed identifier.
smithy-model/src/main/java/software/amazon/smithy/model/loader/IdlNodeParser.java