* Refactor language information classes * Implement SimpleLanguageInformation abstract class * Move some properties to SimpleLanguageInformation * Implement format and debug buttons disabling if Intellisense is not supported for current language * Add Intellisense available check in FormsExtensions to deactivate menu items if needed * Change function interfaces in VisibilityService * Replace CodeCompletionController.CurrentParser null checks with IntellisenseAvailable method call * Refactor IParser and BaseParser to deduplicate code * Fix BuildTreeInSpecialMode in SPythonParser * Add SimpleParser class for new languages without Intellisense * Delete duplicate SetDebugButtonsEnabled function * Add Intellisense available check in RunService when attaching debugger * Delete inner check in SetDebugButtonsEnabled to improve architecture * Change CurrentParser property in CodeCompletion to be CurrentLanguage * Divide ILanguageInformation into two interfaces (creating new ILanguageIntellisenseSupport) * Fix LanguageIntellisenseSupport initialization in BaseLanguage * Fix RunService fictive_attach logic * Disable Intellisense parsing for languages without Intellisense support * Add DefaultLanguageInformation abstract class * Add default implementation for SetSemanticConstants in BaseLanguage * Simplify IParser interface * Update developer guide documentation
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using PascalABCCompiler.Parsers;
|
|
using PascalABCCompiler.ParserTools.Directives;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Languages.SPython.Frontend.Data
|
|
{
|
|
internal class SPythonLanguageInformation : ILanguageInformation
|
|
{
|
|
public string Name => "SPython";
|
|
|
|
public string Version => "0.0.1";
|
|
|
|
public string Copyright => "Copyright © 2023-2026 by Vladislav Krylov, Egor Movchan";
|
|
|
|
public string[] FilesExtensions => new string[] { ".pys" };
|
|
|
|
public string[] SystemUnitNames => new string[] { "SPythonSystem", "SPythonHidden", "SPythonSystemPys" };
|
|
|
|
public bool SyntaxTreeIsConvertedAfterUsedModulesCompilation => true;
|
|
|
|
public BaseKeywords KeywordsStorage { get; } = new SPythonParser.SPythonKeywords();
|
|
|
|
public Dictionary<string, DirectiveInfo> ValidDirectives { get; protected set; }
|
|
|
|
public string CommentSymbol => "#";
|
|
|
|
public bool CaseSensitive => true;
|
|
|
|
private readonly Dictionary<string, string> specialModulesAliases = new Dictionary<string, string>
|
|
{
|
|
{ "time", "time1" },
|
|
{ "random", "random1" },
|
|
};
|
|
|
|
public Dictionary<string, string> SpecialModulesAliases => specialModulesAliases;
|
|
}
|
|
}
|