﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cdl.compiler
{
    /// <summary>
    /// Enum Describing all of the languages supported by cdl.
    /// </summary>
    public enum Language
    {
        /// <summary>
        /// Native Java Class
        /// </summary>
        Java,
        /// <summary>
        /// TypeScript
        /// </summary>
        TypeScript,
        /// <summary>
        /// C Sharp Support
        /// </summary>
        Csharp,
        /// <summary>
        /// Swift Support
        /// </summary>
        Swift
    }

    public static class LanguageExtensions
    {
        public static string Extension(this Language _lang)
        {
            switch (_lang)
            {
                case Language.Csharp: return "cs";
                case Language.Java: return "java";
                case Language.Swift: return "swift";
                case Language.TypeScript: return "ts";
            }

            return "code";
        }
    }
}
