static Node expectAndSkipNode(IdlModelLoader loader, SourceLocation location) {
        IdlInternalTokenizer tokenizer = loader.getTokenizer();
        IdlToken token = tokenizer.expect(IdlToken.STRING,
                IdlToken.TEXT_BLOCK,
                IdlToken.NUMBER,
                IdlToken.IDENTIFIER,
                IdlToken.LBRACE,
                IdlToken.LBRACKET);

        switch (token) {
            case STRING:
            case TEXT_BLOCK:
                Node result = new StringNode(tokenizer.getCurrentTokenStringSlice().toString(), location);
                tokenizer.next();
                return result;
            case IDENTIFIER:
                String shapeId = loader.internString(IdlShapeIdParser.expectAndSkipShapeId(tokenizer));
                return createIdentifier(loader, shapeId, location);
            case NUMBER:
                Number number = tokenizer.getCurrentTokenNumberValue();
                tokenizer.next();
                return new NumberNode(number, location);
            case LBRACE:
                return parseObjectNode(loader, location);
            case LBRACKET:
            default:
                return parseArrayNode(loader, location);
        }
    }
Expects that the current token is a valid Node, parses it into a {@link Node} value, and assigns it a custom
{@link SourceLocation}.

<p>The tokenizer is advanced to the next token after parsing the Node value.</p>

@param loader IDL loader.
@param location Source location to assign to the node.
@return Returns the parsed node value.
@throws ModelSyntaxException if the Node is not well-formed.
smithy-model/src/main/java/software/amazon/smithy/model/loader/IdlNodeParser.java