//============================================================================// // // // artichoke programming language // // // // Copyright (C) 2025 Erick Saul Guzman Ramos, whoami.artichoke.dev // // // // // // 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, either version 3 of the License, or // // (at your option) any later version. // // // // 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 . // // // //============================================================================// #pragma once #include #include namespace arti::lang::ast { namespace nodes { /* Forward declaration of types */ /* Main declaration node types */ struct CharLiteral; struct NullLiteral; struct StringLiteral; struct FloatLiteral; struct IntegerLiteral; struct BooleanLiteral; struct ObjectLiteral; /* Helper declaration node types */ struct ObjectLiteralNamedFieldInit; struct ObjectLiteralNamedInitializer; struct ObjectLiteralPositionalInitializer; } // namespace nodes /* Public Aliases */ using CharLtrlNode = Ptr; using NullLtrlNode = Ptr; using StringLtrlNode = Ptr; using FloatLtrlNode = Ptr; using IntegerLtrlNode = Ptr; using BooleanLtrlNode = Ptr; using ObjectLtrlNode = Ptr; using ObjectLtrlNamedFieldInitNode = Ptr; using ObjectLtrlNamedInitializerNode = Ptr; using ObjectLtrlPositionalInitializerNode = Ptr; /* Variant nodes */ using ObjectLtrlInitializerNode = Variant< ObjectLtrlNamedInitializerNode, ObjectLtrlPositionalInitializerNode >; /* Node definitions */ struct nodes::CharLiteral { SourceLocation location; uint8_t value; }; struct nodes::NullLiteral { SourceLocation location; }; struct nodes::StringLiteral { SourceLocation location; String value; }; struct nodes::FloatLiteral { SourceLocation location; double value; }; struct nodes::IntegerLiteral { SourceLocation location; uint64_t value; }; struct nodes::BooleanLiteral { SourceLocation location; Boolean value; }; /* INFO: Helper types definitions are on Expressions.hpp * due to dependency in ExpressionNode variant. */ } // namespace arti::lang::ast