/*
* This file is part of the Intuitive DSL project.
* Copyright (c) 2026 DBA Labs - Switzerland. All rights reserved.
*
* This program is dual-licensed under a commercial license and the AGPLv3.
* For commercial licensing, contact us at [email protected] or visit https://www.dbalabs.ch.
*
* AGPLv3 licensing:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, version 3 (19 November 2007).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/agpl-3.0.html>.
*/
package ch.dbalabs.intuitivedsl.parser;
/**
* Represents a single lexical unit (token) extracted from the raw input string.
* <p>
* This record holds the actual string value, the type of the token, and its
* starting position in the original input string to provide accurate error reporting
* (e.g., placing the cursor exactly where a syntax error occurred).
* </p>
*
* @param value the string value of the token
* @param type the type of the token (WORD, STRING, DELIMITER, or EOF)
* @param position the starting index of the token in the original input string (0-based)
*
* @author DBA Labs
*/
public record Token(String value, TokenType type, int position) {
}