# frozen_string_literal: true module LIT module Parser # @api public # @since 0.1.0 module AST Program = ::Struct.new(:statements) EndpointStatement = ::Struct.new(:name, :request, :response) module EnumVariant Unit = Module.new Struct = ::Struct.new(:fields) end module TypeDeclarationStatement Struct = ::Struct.new(:name, :fields) Enum = ::Struct.new(:name, :variants) TypeAlias = ::Struct.new(:name, :type) end module Type Alias = ::Struct.new(:name) AnonymousStruct = ::Struct.new(:fields) AnonymousEnum = ::Struct.new(:variants) module Primitive String = Module.new Integer = Module.new Float = Module.new Boolean = Module.new Option = ::Struct.new(:type) Array = ::Struct.new(:type) Map = ::Struct.new(:key_type, :value_type) end end end end end