* Override get_system_module in SpythonSyntaxTreeVisitor * Fix Unit and Function Having Same Name Bug * Add TimeMeasurements Programs * Swap Visitors for Supporting New Imports * Fix Function with Named Parameters Substitution * Add Error for Using Global * Fix yyloc Bug and Add SyntaxVisiters Errors * Move List Desugar from Visiter to Parser (temp) * Move List Generator Desugaring Back to Visitors * Add Args after Kvarg Error Message * Fix Parser and Visitors' Errors Messages * Moved Examples Programs * Update Name Substitution Logic * Squashed commit of the following: commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * feat(bin/LanguageKits/SPython): add more things to installer * Change get_system_module method visibility (and some more) * Update SPython language names * Add CaseSensitive boolean saving in pcu * Implement case sensitive symbol table * Fix Create function not found error * Delete try/catch block in CollectNamesFromUsedUnits to make code cleaner * Create languageCaseSensitive field in pcu * Create CompilationArtifacts struct for passing data to ConvertAfterUsedModulesCompilation * Fix GraphWPF importing problem by dirty workaround !!! * Squashed commit of the following: commit 57ff5ef37d04ce8fcac8705c5a693bddf2ecf10e Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Feb 27 12:56:53 2025 +0300 Fix Global Variables Type Definition Основная программа выносится в функцию, определяемой самой первой и first_assignment_defines_type выводит тип глобальных переменных корректно commit 6f93ae8d6afc1c685d602b85ba6d455d862b35af Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 26 17:33:10 2025 +0300 Replace same_type_node, Fix Procedure Assignment commit 52a096394cfdd4d8e4b27ddd36570b45b053c380 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Feb 20 13:59:16 2025 +0300 Fix Local Scope in If Node commit a0be5bed7f110314c0e512d28a76e3bd87328f01 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 16:40:50 2025 +0300 Fix Bug with same_type_node commit 04fd2b2a6667bf06af02614a2fd30d0b50172a0c Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 16:09:27 2025 +0300 Fix Assignment for New Variables commit ea591e243a5a458d6d94e665cec50d9ef60e1a08 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 15:58:45 2025 +0300 Fix Assignment for Imported Variables in Functions commit e5d71be7693c527e6f4cd88671503dafa0ac9777 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 15:13:21 2025 +0300 Fix SPython's Syntax Node Erasion commit c78649ac7e7883860ce459cb31f9d9e46194f203 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 14:35:53 2025 +0300 Fix Variables from Module Assignment commit 4890f7f163a2557bc58d6e9c48cb432c6436a3aa Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 13:36:53 2025 +0300 Return RetainUsedGlobalVariablesVisitor commit e5460edf2fae002ccc64d261bbb8fadb27deec12 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 13:05:38 2025 +0300 Add Errors for Wrong Global Usage commit e32387e1356cc1e330518c57ab895f89b9de1784 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 12:33:55 2025 +0300 Update Comments about Syntax Visitors commit 1f6c7ac2d8c891d582cbe957ed2ad6886de27de1 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 12:27:59 2025 +0300 Fix Global Variables read access for global variables in fuctions by default commit e840610a25718ba12df144948bdda175cbc8d7c5 Merge: e70cb9914 6c81b45c0 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Fri Feb 14 19:51:38 2025 +0300 Merge branch 'SPython' into SPython-Context-Change commit e70cb99145120df29d1ae172d1b00afa8ea5b18f Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Fri Feb 14 19:49:18 2025 +0300 Return Back Global Keyword commit 7cf7a24b8f927cad72645e028f0e0ebc47cae328 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 12 13:15:35 2025 +0300 Fix Merge commit 89cc4551a0bcdb55eb64d244e35035134e5f6e75 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 12 13:02:06 2025 +0300 Squashed commit of the following: commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Squashed commit of the following: commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Fix Merge Commit * Fix Assignment to Imported Variable * Add Compound Comparison (alpha) * Fix Compound Comparison False Positive конструкция '(a == b) == c' теперь не считается CompoundComparison * Reconstruct NameInterpreterVisiter * Parser and Visitors Refactoring 1 * Fix Modules * Parser and Visitors Refactoring 2 * Update RetainUsedGlobalVariablesVisitor * Update RetainUsedGlobalVariablesVisitor 2 * Add Variable Declaration without InitValue a: float a = 1.23 * Add Global Variables in Units In units all variables defined in outermost scope are global * Add Template Types (list[int]) * Add Errors for Using PascalABCnet Types * Add Power Binary Operation * Fix SourceContext in Parser and ImportToUsesVisitor * Add pass Statement * Fix Nested List Generators * Fix NameCorrectVisitors in Complex Cases fix in nested dot_nodes and lambda's inside list generator * Fix IdentArranger for Complex Cases now it handles correctly cases such as follows: print(a, b, c, d, e, f) * Add Ternary Conditional Operator * Fix Lexer and New Line Error * Add End File Token to Fix Errors Positioning * Fix Errors Positioning * Move AddForwardDeclarationsVisitor Lower * Update Comments in StandardSyntaxTreeConverter * Update Examples * Fix CompoundComparisonDesugarVisitor * Update Comments * Create compound_conditions_example.pys * Separate ';' and End_Of_Line Token * Fix Error Line Positioning * Fix Lexer Error Message with COLON * Fix Error Positioning * Fix Colon Error Positionning * Fix Error Next Token Hints * Fix Errors with 'in' and 'import' * Add UnsupportedConstructsVisitor * Add Error for Using class and lambda * Refactor IndentArranger * Add programBeginWithIndentToken * Squashed commit of the following: commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Add units case sensitive search (Not implemented in Intellisense) * Fix Functions Forward Declarations * Update Wrong Module Name Error Positionning * Fix Errors with Global Statements * Fix Function Before Declaration Usage Error * Add return_statement * Add Return Wrong Usage Error * Errors Hot Fix * Add Bigint Type * Squashed commit of the following: commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Fix Types Names in Errors * Update Examples * Try To Add Python's list[T] * Add BackSlash Support * Add ANIM examples * Fix compilation context instance assigning * Squashed commit of the following: commit771ea7b445Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Apr 6 14:32:17 2025 +0200 #3230 commit28a1a03e8dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Apr 6 11:35:09 2025 +0200 #3251 commitaf7abc770bAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Apr 6 08:33:34 2025 +0300 synchronization of namespaces and folders for TeacherControlPlugin (#3262) commitaae723b982Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 12:00:04 2025 +0300 Create default syntax tree converter class (#3216) Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева. commitf9cc90e50fAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Apr 3 11:59:46 2025 +0300 fix errors (#3260) commitf85bfad60fAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 11:58:19 2025 +0300 Intellisense memory leaks fix (#3257) * Fix memory leaks found for PABCSystem.pas Memory leaks of Interface and Implementation Unit Scopes fixed * Change open_files and recomp_files variables type to be Dictionary (not HashTable) * open_files Check simplification * Move TypeTable.Clear call to CodeCompletion Compile method commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Fix DefaultSyntaxTreeConverter * Update some comments in spython_syntax_tree_visitor * Configure Intellisense - first step * DomSyntaxTreeVisitor fixes * Add implementation for parser methods used by Intellisense * Add declarations_as_statement visit in DomSyntaxTreeVisitor implementation * Refactor CodeCompletion.cs * Fix Intellisense case sensitive units search * Squashed commit of the following: commit bb7962ff859946a71ded0df465d024c14559cb04 Merge: 71261ded1aae723b98Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 12:23:21 2025 +0300 Merge branch 'master' into intellisense_refactoring commit 71261ded190a40dcf2301f37b4ac70356cfb35af Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Thu Apr 3 12:16:52 2025 +0300 Update comments in PascalABCLanguageInformation commitaae723b982Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 12:00:04 2025 +0300 Create default syntax tree converter class (#3216) Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева. commitf9cc90e50fAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Apr 3 11:59:46 2025 +0300 fix errors (#3260) commitf85bfad60fAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 11:58:19 2025 +0300 Intellisense memory leaks fix (#3257) * Fix memory leaks found for PABCSystem.pas Memory leaks of Interface and Implementation Unit Scopes fixed * Change open_files and recomp_files variables type to be Dictionary (not HashTable) * open_files Check simplification * Move TypeTable.Clear call to CodeCompletion Compile method commit d52ce0d4c86ec1fb6962db33a8dc774b69fddd69 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Thu Apr 3 11:15:02 2025 +0300 Squashed commit of the following: commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit a11bb9e9c6271e359fde6050e95d98950e946fbd Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Nov 10 19:43:45 2024 +0300 Fix encoding commit 2c0fba643e45914b8f5350356e1c24b3c3cf3685 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Nov 10 19:21:54 2024 +0300 Fix build error commit f813a4ff99936dabdcfda40ce5beea2ba41aed53 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Nov 10 19:08:44 2024 +0300 Update intellisense documentation commit 8414c7ae1d6ed296a86e56975d84949a6e471a25 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Nov 10 19:08:03 2024 +0300 Another iteration of refactoring in CodeCompletionProvider + comments commit 340ef9a0e9bc40f7bda0cde8dccb86c94dc6c8cb Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Nov 10 14:51:56 2024 +0300 Fix GetCompletionDataByFirst behaviour when getting symInfos after uses keyword commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commit 8e9e7f94d094e528aeb9bd0db322005b08e31ee3 Merge: ea3c878ebfbd63efa8Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Fri Nov 8 14:47:33 2024 +0300 Merge branch 'master' into intellisense_refactoring commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit ea3c878eb27a268d50272838a36508511f1096ee Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Oct 27 22:40:40 2024 +0300 Refactor GetCompletionDataByFirst method commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit 0ae57063a798ec7dc4979a1cea32371034794907 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Tue Oct 22 12:54:05 2024 +0300 Replace dollar service character in CodeCompletion by separate boolean (ctrlSpaceAfterDot)) commit 89a02c2867b41cb12020a31867667c89f9fbb848 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Tue Oct 22 10:48:21 2024 +0300 Extract shift space actions in separate class commit cb24d274969f67255c7cb253fbc36d25d6aaa2be Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Oct 20 22:54:32 2024 +0300 Refactor CodeCompletionProvider (first iteration) commit 10b16014b8e19fac339752466b1733359675a052 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Oct 20 18:14:06 2024 +0300 Add check that we parsing PascalABC.NET in GetPopupHintText Временное решение, нужно будет вынести вторую попытку в интерфейс парсера. commit 4057884d749788726bc095581d1519ff8fec7037 Merge: d95eab7900c773a7ecAuthor: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Oct 20 17:33:07 2024 +0300 Merge branch 'master' into intellisense_refactoring commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit d95eab790c41cb2f8ac38be997ca81af30ee22be Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Thu Oct 10 14:14:43 2024 +0300 Delete other cases of ampersend inserting commit b2aaa157c1ae1965ae2a20eb3e5454f4df37b1a8 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Oct 9 22:48:37 2024 +0300 Basic refactoring of GetPopupHintText + delete ampersend inserting commit 4554bd5581bdf61601e454650a34422c8bf93c0c Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Oct 9 18:56:23 2024 +0300 Move ValidDirectives field to ILanguageInformation commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit d8b05d3d80500fc10cb964a5ec62c7244e4993f8 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Oct 9 09:53:35 2024 +0300 Fix inaccuracy in BaseKeywords.cs commit c45f66baf5a159d07ddc7ded63bad56387799fc1 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Oct 9 09:47:43 2024 +0300 Manage references in PascalABCLanguageInfo project commit 342cb23f2eb33948cc7d058e04a10fd4b5c1e2a4 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Oct 9 00:06:25 2024 +0300 Fix string comparisons and null reference exception commit 386f59d5fd5b29f010f59194ef1324d23a5651ca Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Tue Oct 8 23:18:53 2024 +0300 Fix build error commit 851936f02544879644b3284cf472c8c9c2ea8fa9 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Tue Oct 8 23:12:16 2024 +0300 Refactor keywords managing to avoid repeating them twice commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Add BaseLanguageInformation and SPythonLanguageInformation * Delete unnecessary TestSuite files * Remove syntax_tree_visitor inner objects duplicates creation in spython_syntax_tree_visitor * Move CompilationUnit.UnitFileName initialization to InitializeNewUnit function * Override internal_reset method in spython_syntax_tree_visitor to fix pas test error * Delete dll files from git * Add standard SPython modules to compilation samples * Add List Methods Names Mapping * Add Grammar Rules for Intellisense * Configure Intellisense - step 2 * Fix languages loading call position * Change comments check in expression finding for SPython * Add SPython standard types to SPythonSystem (implicitly) * Add syntax tree converters calls for SPython in Intellisense * Squash merge master branch * Adapt SPython project files to new build system * Update FunctionsWithNamedParametersDesugarVisitor.cs * Fix output paths in SPython projects * Update _ReBuild.bat * Fix Main Function source_context * Extract converters for Intellisense only usage * Implement import statements in Intellisense Алиасы пока не поддерживаются * Remove Result varible for SPython in Intellisense * Remove standard modules and net namespaces from user scope * Adjust standard units to achieve not adding PABCSystem and Extenstions names to their scope * Add Set, Operator in/not in * Add Dict * Add len Function and dict/set types * Add list and set Functions * Comment out TypeCorrectVisitor for Intellisense * Fix New Types Names in Error Messages * Add Set Methods * Add special names renaming and excluding function in ILanguageInformation Используется для убирания подсказки PABCSystem, корректирования типа biginteger в SPython. * Add aliases support for import and from import in Intellisense * Fix list_generator Desugaring in Intellisence * Add dict Methods * Fix List Generator * Fix Assignment Declaration * Move math And time Libs to bin\Lib * Rename list_generator to generator_object * Fix Parser to Use generator_object * Add set generator * Add any and all Functions * Add Function Calls for generator objects * Add dict generator * Add empty containers initializations * Fix empty_list/set/dict error message * Fix type(obj) Function in Standard Library * Add Error if Initialize with No Type Specification and Empty Collection * Fix Initialization with Empty Collection for Global Variables * Add round Function * Add map Function * Revert "Add map Function" This reverts commit 4fb787a0122a6f404a4061fb6647561f0117739a. * Fix map Function * Update Visitor Name * Add Bitwise Operators * Add Bitwise Assignment Operations * Fix Set Binary Operations * Fix Global Assignments * Add f-string for Strings without Format * Update SPythonParser.dat * Add Expression-Support in f-string * Fix f-string Inner-Parser Call * Add int and float Formats for f-string ('x', 'X', 'b', 'd', '.[num]f') * Fix f-string regex * Fix result Local Variable * Add cont_int with Underscore * Add Empty itertools.pas Unit * Add args Parameters * Add kvargs Function Declaration (pre-alpha) * Update StandardSyntaxTreeConverter.cs * Fix kvargs-functions Forward Declarations * Add kvargs-functions Call (pre-alpha) * Add kvargs-parameters Usage * Add kvargs-function Call with no kvargs-arguments * Move Standard print Function to Unit Written in SPython * Update .dll's * Hot Fix * Update spython_syntax_tree_visitor.cs * Add Multi-Variables foreach * Fix create Name * Big Kwarg-Update * Change Create name in StringConstants and fix check in syntax_tree_visitor * Update buildandruntests.yml * Squashed commit of the following: commit f7834348258fd70cb34949908f157a37c4e013db Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Thu Jun 12 15:55:53 2025 +0300 Delete language kits directory creation while installing PascalABC.NET commit 78f40b7377fa6c62fbdd9a19754d8c14ae68cf7f Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Jun 12 15:35:30 2025 +0300 Create time1.pas commit ba6cc457366a96efa650eeb2ffb90c5735de13f3 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Jun 12 14:54:36 2025 +0300 Move TypeCorrectVisitor commit f9ae902f0df63aa2916683869ac0cff4dd71bd91 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Jun 12 13:39:42 2025 +0300 Fix Mutual Functions Calls commit da3b502df1b889c0b02a00815aa8a9df1bcbe31e Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Jun 12 13:10:49 2025 +0300 Add Itertools Examples and fix Kwargs commit a6d2f593a0e54b50d8b4b27fb56026b9ede740d0 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 23:23:28 2025 +0300 Add special modules aliases support in Intellisense and switch off unit hints for import statements commit 0d5122eef93cb2dbd9728b1877b0bfb0544ef9b8 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 19:23:36 2025 +0300 Create FindScopeByLocation modification for SPython Для нахождения вложенных в MAIN функций commit af7235ce8bee4b45ffd6c3b479f8e828932f69b4 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 17:59:22 2025 +0300 Add ExitParamVisitor in visitors pipeline commit 3f5a4f4950a3d3f2035ec2b18081a01c734c1a96 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 17:35:30 2025 +0300 Small fixes commit 3f32348b2f4dd66edd372d3989d7651ac56a5d93 Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 17:11:07 2025 +0300 Fix merge error commit 684d6a36912ef5c5ad82d4de0807683eac87debf Merge: 8e506f409eeb3116aeAuthor: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 17:06:42 2025 +0300 Merge branch 'master' into Spython_refactoring commit 8e506f409e4b34ad81620bf352813ab507e6134e Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 16:44:37 2025 +0300 Implement visitors pipeline for PascalABC.NET commit 0e8e4d5c786cbad5257804ce495fe410546ddf4c Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Wed Jun 11 14:10:22 2025 +0300 Refactor SPython StandardSyntaxTreeConverter to use pipeline approach commiteeb3116aeaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jun 10 21:30:20 2025 +0300 3.10.3.3634 commitea338d6bfeAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jun 10 20:30:42 2025 +0300 2025 in GlobalAssemblyInfo.cs commit4dc6bd72efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jun 10 20:19:18 2025 +0300 chm восстановил commitfd139b4700Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jun 10 20:09:10 2025 +0300 fix SemanticTreeConverter.cs encoding (#3273) commitd11674efc2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jun 10 19:56:16 2025 +0300 Вернул старый css для справки commit9aee28f4f0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jun 10 19:54:57 2025 +0300 2025 commit07370e365fAuthor: Sun Serega <sunserega2@gmail.com> Date: Tue Jun 10 19:18:02 2025 +0300 Upgrade windows runner for CI/CD (#3271) * Try upgrade windows runner for CI/CD * Update names and BOM commit50fd3cb1eeAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed May 28 23:01:09 2025 +0300 * adding supports enumeration check for Pascal types in foreach resolver (#3272) * fix naming commit5fec52615aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat May 24 21:36:36 2025 +0300 Распаковка KeyValuePair| И в foreach commitfbb5dec9a9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat May 17 19:34:33 2025 +0300 Внешний Between commita914ab6ef5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri May 16 16:57:00 2025 +0300 InRange изменение поведения и внешний commit04059ab235Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed May 14 19:57:30 2025 +0300 Исправлены библиотеки PT4Exam commit40bfc046a8Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed May 14 19:40:04 2025 +0300 Fix shift space action in Intellisense (#3269) commite3a64850efAuthor: dmkwketx <dmkwketx@gmail.com> Date: Mon May 12 21:14:21 2025 +0300 Update GraphWPF.pas (#3270) если title больше одной строки, показывалась только последняя. теперь все строки будут показаны. commite9cf278fddAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon May 12 10:24:04 2025 +0300 IsOrdered в разных воплощениях commit255533f407Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri May 9 16:39:12 2025 +0300 IsOrdered метод расширения commit4c56298bfbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu May 8 22:53:34 2025 +0300 exit(param) commitc22dee65faAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed May 7 10:57:41 2025 +0300 sp2 commit3f37c2cc4fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed May 7 10:56:51 2025 +0300 sp commitcdfde69281Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri May 2 21:44:57 2025 +0300 2 chars commit2e27beef48Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 10 13:14:04 2025 +0300 Create generic instances cache (#3259) * First attempt to create generic instances cache * Change TypeScope equality check and add instance cache clearing * Move instance cache clearing call to CodeCompletion Compile funciton Шаблонные типы в instance_cache не должны пересекаться для различных модулей. Для улучшения производительности вызов очистки кэша расположен перед вызовом компиляции всех модулей. * Squashed commit of the following: commit771ea7b445Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Apr 6 14:32:17 2025 +0200 #3230 commit28a1a03e8dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Apr 6 11:35:09 2025 +0200 #3251 commitaf7abc770bAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Apr 6 08:33:34 2025 +0300 synchronization of namespaces and folders for TeacherControlPlugin (#3262) commitaae723b982Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 12:00:04 2025 +0300 Create default syntax tree converter class (#3216) Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева. commitf9cc90e50fAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Apr 3 11:59:46 2025 +0300 fix errors (#3260) commitf85bfad60fAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 11:58:19 2025 +0300 Intellisense memory leaks fix (#3257) * Fix memory leaks found for PABCSystem.pas Memory leaks of Interface and Implementation Unit Scopes fixed * Change open_files and recomp_files variables type to be Dictionary (not HashTable) * open_files Check simplification * Move TypeTable.Clear call to CodeCompletion Compile method * Fix incorrect dictionary iteration * Add one more dictionary keys copying commit69149f8c44Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 10 13:13:17 2025 +0300 Refactor intellisense (#3213) * Refactor keywords managing to avoid repeating them twice * Fix build error * Fix string comparisons and null reference exception * Manage references in PascalABCLanguageInfo project * Fix inaccuracy in BaseKeywords.cs * Move ValidDirectives field to ILanguageInformation * Basic refactoring of GetPopupHintText + delete ampersend inserting * Delete other cases of ampersend inserting * Add check that we parsing PascalABC.NET in GetPopupHintText Временное решение, нужно будет вынести вторую попытку в интерфейс парсера. * Refactor CodeCompletionProvider (first iteration) * Extract shift space actions in separate class * Replace dollar service character in CodeCompletion by separate boolean (ctrlSpaceAfterDot)) * Refactor GetCompletionDataByFirst method * Fix GetCompletionDataByFirst behaviour when getting symInfos after uses keyword * Another iteration of refactoring in CodeCompletionProvider + comments * Update intellisense documentation * Fix build error * Fix encoding * Squashed commit of the following: commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll * Update comments in PascalABCLanguageInformation commitcc7d4472c6Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 10 12:19:31 2025 +0300 Write developer guide for integrating new language (#3264) commit5d842153a5Author: Sun Serega <sunserega2@gmail.com> Date: Thu Apr 10 12:17:52 2025 +0300 Add NSIS binaries to .gitignore exclude (#3265) commitee31ed94b3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Apr 10 12:06:40 2025 +0300 TeacherControlPlugin.cs - шифрованные модули commitba23a01e29Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Apr 9 10:59:16 2025 +0300 Закомментировал неверный обработчик commit3f70700d2bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Apr 7 22:07:13 2025 +0300 nsis новый - папка bin TeacherControlPlugin.cs - добавление обработчика для последующей шифровки Tasks.pas commit0353abf57cAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Apr 7 08:35:22 2025 +0300 fix caching Localization assembly (#3263) commit771ea7b445Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Apr 6 14:32:17 2025 +0200 #3230 commit28a1a03e8dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Apr 6 11:35:09 2025 +0200 #3251 commitaf7abc770bAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Apr 6 08:33:34 2025 +0300 synchronization of namespaces and folders for TeacherControlPlugin (#3262) commitaae723b982Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 12:00:04 2025 +0300 Create default syntax tree converter class (#3216) Для удобства разработчиков простых языков, которым не требуются дополнительные обходы синтаксического дерева. commitf9cc90e50fAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Apr 3 11:59:46 2025 +0300 fix errors (#3260) commitf85bfad60fAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Apr 3 11:58:19 2025 +0300 Intellisense memory leaks fix (#3257) * Fix memory leaks found for PABCSystem.pas Memory leaks of Interface and Implementation Unit Scopes fixed * Change open_files and recomp_files variables type to be Dictionary (not HashTable) * open_files Check simplification * Move TypeTable.Clear call to CodeCompletion Compile method commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Fix merge error * Delete extra files * Move Examples to pascalabcnet\PABCNetHelp\Examples\SPython * Update .dll * Move examples to pascalabcnet\CodeExamples\SPython * Revert pipeline visitors architecture for Pascal * Add AssignIntegerDivisionOperation * Revert pipeline visitors architecture for SPython * Add len(str) * Fix inaccuracies * Fix case sensitive string comparison in some lambda classes * Small fix in BaseLanguageInformation * Revert changing Create string to constant in Pascal visitors * Resolve some pull request issues * Add Tuple-Type to Right Part of Assignment * Add Tuple-Assignments a, b = 1, 2 * Delete unused function in DomSyntaxTreeVisitor * Fix Tuple Assignment * Add tuple TypeName * Add turbo_tuple_expr to return_stmt * Add Tuple-related Errors * Update pabcnetc_clear/CommandConsoleCompiler.cs encoding Co-authored-by: Sun Serega <sunserega2@gmail.com> * Delete IndentArranger.exe * Fix Generator in for Loop * Fix Char-Assignment Type Inference * Fix Collections Method Error Handling * Fix result variable case sensitive comparing * Fix Result Name Constants in Visitors * Fix merge errors * Resolve some pull request conversations * Add SPython projects in pabcnetc.sln and PascalABCNETLinux.sln * Delete Gplex.exe and Gppg.exe in SPython project * Fix tuple-type Name in Errors * Move time1.pas and Fix _ReBuild.bat * Update _ReBuild.bat * Fix method calls without parentheses in SPython * Fix Localizations Files * Remove SPythonParser.sln * Refactor TipPainterTools to support inner parentheses in function parameters * Update Linux TipPainterTools * Fix dict Type Specialization * Add GetDescriptionForCompiledMethod in SPython * Squashed commit of the following: commitbf3ba7d288Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 4 12:51:30 2025 +0300 interface у Turtle.pas Команда изменения цвета и ширины commit59ed71f459Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 4 10:29:08 2025 +0300 Команды ПоменятьЦвет и ПоменятьШиринуПера теперь учитываются в Черепахе commit160dd58195Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jul 20 17:00:28 2025 +0300 fix #3324 commit6218cc8723Merge:cabe8f85e89e02b504Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jul 19 20:06:38 2025 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commitcabe8f85eeAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jul 19 20:06:25 2025 +0300 Min(1) Max(1) commit89e02b504eAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Thu Jul 17 10:08:54 2025 +0300 Update CodeCompletionActions.cs (#3323) Показ Code Completion Window по Ctrl-Space, если курсор находится сразу после точки (как сделано в Win версии). Текущее поведение - после точки ccw не показывать, только если курсор переместить на несколько символов вправо от точки. commitc080feba89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 15 16:06:58 2025 +0300 RayTracer/RayTracer3.pas commitcc266b3863Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Mon Jul 14 19:08:55 2025 +0300 Поправки в LanguageInformation (#3322) * Fix inaccuracy * Delete useless variable * Implement refreshing description before showing it in Intellisense windows * Fix inaccuracies * Add GetDescriptionForArray and GetDescriptionForDelegate in SPythonLanguageInfo * Exclude Read Write Async and Await from keywords list in Intellisense commit56d1eb5648Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sun Jul 13 18:44:29 2025 +0300 Обновление описания сущностей в Intellisense (#3321) * Implement refreshing description before showing it in Intellisense windows * Change BuildDescription in ProcScope * Fix description rebuild bug commit4cec1e7c43Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jul 13 13:13:29 2025 +0300 fix #3299 Revert incorrect pr intellisense commit20a1436129Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sun Jul 13 10:19:40 2025 +0300 Исправление неправильных изменений в LanguageInformation (#3319) * Fix inaccuracy * Delete useless variable * Implement refreshing description before showing it in Intellisense windows * Fix inaccuracies * Add GetDescriptionForArray and GetDescriptionForDelegate in SPythonLanguageInfo commit9e9a0469b3Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Jul 10 18:35:07 2025 +0300 Добавление обновления описания сущностей из Intellisense перед выводом их в окошке (#3320) * Implement refreshing description before showing it in Intellisense windows * Change BuildDescription in ProcScope commite14b517e9dAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Jul 5 11:09:00 2025 +0300 Update ProcessRunner.cs -- fix for space chars in running app file name (#3317) fix pascalabcnet/pascalabcnet#ISSUE-3315 commit6fa1caa034Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sat Jul 5 11:05:34 2025 +0300 Учет случая params в TipPainterTools при подсветке (#3318) * Refactor LanguageInformation classes * Improve extension check in TipPainterTools * Refactor parsing parameters for signature help * Fix TipPainterTools Linux version * Add Params check in TipPainterTools commita1584f4f90Author: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Jul 5 11:05:10 2025 +0300 Update RobotField.pas (#3310) Адаптировано для Linux версии PABC * показываются надписи на форме в Ubuntu * шрифт надписей приведён к совместимому Sans Serif * Помощь - замена #10#13 на NewLine определяемый платформой commit19f78930edAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Thu Jul 3 20:42:47 2025 +0300 removing hard code (#3313) commitef795bbb64Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Thu Jul 3 20:39:09 2025 +0300 renaming method and adding comments (#3312) commit9d57c427acAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 30 19:33:04 2025 +0300 MainForm.Load += commit9927a0e305Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Jun 30 19:19:24 2025 +0300 fix type name comparsion (#3309) commit7614931f06Author: dmkwketx <dmkwketx@gmail.com> Date: Mon Jun 30 19:18:05 2025 +0300 Update WhatsNew 3_10_4 files: exit_param2.pas & exit_param3.pas (#3305) * Update exit_param3.pas Добавлена проверка, что числа меньше числа 2 не простые. особенно единица * Update exit_param2.pas Добавлена проверка что числа меньше числа 2 не простые. commitdccd7942b7Author: Nikolay Kuznetsov <adasoft@gmail.com> Date: Mon Jun 30 19:17:09 2025 +0300 Added ABCObjects samples to Linux build (#3306) commit0b3471daa0Author: Nikolay Kuznetsov <adasoft@gmail.com> Date: Mon Jun 30 19:16:51 2025 +0300 Delete InstallerSamples/Graphics/GraphABCLinux directory (#3307) Удалить как неиспользуемую commitd4173b0becAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sat Jun 28 16:12:28 2025 +0300 removing hard code (#3304) commit0972d09837Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sat Jun 28 16:10:29 2025 +0300 Return break, continue и exit in completion list (#3298) commit5abe6333baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Jun 26 13:25:24 2025 +0300 опечатка в комменте commitaa42e80c7fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 22:27:48 2025 +0300 2025 by commitae16484db7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 20:06:03 2025 +0300 Пересобрал commit0646c80e4aMerge:107f2c49ba389183efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 20:05:20 2025 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit107f2c49bbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 19:11:42 2025 +0300 Сделал ошибку при передаче в качестве делегата параметром обобщенной функции commitd2440264e8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 19:09:36 2025 +0300 Перенес из ошибок назад в правильные. Вернул странное недокументированное поведение присваивания обобщенной функции делегату commitda16d41c58Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 19:07:18 2025 +0300 Удалил два файла с ошибками - обобщенная функция присваивается делегату commita389183efeAuthor: Sun Serega <sunserega2@gmail.com> Date: Mon Jun 23 23:49:48 2025 +0300 Improve GitIgnoreTester output (#3295) commit63274c3c5eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 23 22:28:17 2025 +0300 Пересобрал 3.11.0.3641 commit34187755deAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 23 22:02:24 2025 +0300 fix #3290 commit6eccd661aeAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 23 16:36:58 2025 +0300 3.11 version with SPython (not in installer!) commit080fca15bbAuthor: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Jun 22 20:56:22 2025 +0300 SPython 1.0 (#3274) * Squashed commit of the following: commit 115ed2e1b7b361b35f0b213688ad0838e0bffa69 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Nov 7 10:21:08 2024 +0300 Add from import Handling commit bdd3eb785e6c719201104497808e89dc20c4eacc Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Nov 3 12:59:29 2024 +0300 Add 'Import As' commit e5747aa56e359633be366887d3cf67d1ec054701 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Nov 3 11:08:50 2024 +0300 Add Ident_list to import commit 9d16fdb341b329adae45dec2bf6db04d8572675f Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Nov 3 10:01:13 2024 +0300 Move Import Handling to Visitor commit d8a0e8f5ee840e3ff15caafd7a456f91e1f2a962 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Nov 2 18:36:10 2024 +0300 Rename of Productions Related to Import commit 71282a457ab0c039a2f42c05249336d92ac76e7a Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Nov 2 18:33:41 2024 +0300 Move import to Statements * Add new AST visitors call template * Add syntax tree parameter * Add SpecialSyntaxTreeConverter * Add CollectNamesVisitor * Read Symbols from Semantic Tree * Add Visitor Renewaling * Fix Usage of Standard Libraries * Update AssignToVarConverterVisitor.cs * Fix Foreach Node Visitor * Refactor InterpreterVisitor (alpha version) * Add Imports Nodes for Declarations * Rename Method for Sending Object * Fix Remove in interface_node * Add ApplyConversionsAfterUsedModulesCompilation method to ILanguage interface * Rename ApplyConcreteConversions to ApplyConversions * Squashed commit of the following: commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Move unitNames dictionary to CompilationUnit class * Implement Spython StringResorces for SyntaxTree Converters * Move post conversion method to ISyntaxTreeConverter interface * Override get_system_module in SpythonSyntaxTreeVisitor * Fix Unit and Function Having Same Name Bug * Add TimeMeasurements Programs * Swap Visitors for Supporting New Imports * Fix Function with Named Parameters Substitution * Add Error for Using Global * Fix yyloc Bug and Add SyntaxVisiters Errors * Move List Desugar from Visiter to Parser (temp) * Move List Generator Desugaring Back to Visitors * Add Args after Kvarg Error Message * Fix Parser and Visitors' Errors Messages * Moved Examples Programs * Update Name Substitution Logic * Squashed commit of the following: commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * feat(bin/LanguageKits/SPython): add more things to installer * Change get_system_module method visibility (and some more) * Update SPython language names * Add CaseSensitive boolean saving in pcu * Implement case sensitive symbol table * Fix Create function not found error * Delete try/catch block in CollectNamesFromUsedUnits to make code cleaner * Create languageCaseSensitive field in pcu * Create CompilationArtifacts struct for passing data to ConvertAfterUsedModulesCompilation * Fix GraphWPF importing problem by dirty workaround !!! * Squashed commit of the following: commit 57ff5ef37d04ce8fcac8705c5a693bddf2ecf10e Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Feb 27 12:56:53 2025 +0300 Fix Global Variables Type Definition Основная программа выносится в функцию, определяемой самой первой и first_assignment_defines_type выводит тип глобальных переменных корректно commit 6f93ae8d6afc1c685d602b85ba6d455d862b35af Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 26 17:33:10 2025 +0300 Replace same_type_node, Fix Procedure Assignment commit 52a096394cfdd4d8e4b27ddd36570b45b053c380 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Feb 20 13:59:16 2025 +0300 Fix Local Scope in If Node commit a0be5bed7f110314c0e512d28a76e3bd87328f01 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 16:40:50 2025 +0300 Fix Bug with same_type_node commit 04fd2b2a6667bf06af02614a2fd30d0b50172a0c Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 16:09:27 2025 +0300 Fix Assignment for New Variables commit ea591e243a5a458d6d94e665cec50d9ef60e1a08 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 15:58:45 2025 +0300 Fix Assignment for Imported Variables in Functions commit e5d71be7693c527e6f4cd88671503dafa0ac9777 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 15:13:21 2025 +0300 Fix SPython's Syntax Node Erasion commit c78649ac7e7883860ce459cb31f9d9e46194f203 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 14:35:53 2025 +0300 Fix Variables from Module Assignment commit 4890f7f163a2557bc58d6e9c48cb432c6436a3aa Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 13:36:53 2025 +0300 Return RetainUsedGlobalVariablesVisitor commit e5460edf2fae002ccc64d261bbb8fadb27deec12 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 13:05:38 2025 +0300 Add Errors for Wrong Global Usage commit e32387e1356cc1e330518c57ab895f89b9de1784 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 12:33:55 2025 +0300 Update Comments about Syntax Visitors commit 1f6c7ac2d8c891d582cbe957ed2ad6886de27de1 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 12:27:59 2025 +0300 Fix Global Variables read access for global variables in fuctions by default commit e840610a25718ba12df144948bdda175cbc8d7c5 Merge: e70cb9914 6c81b45c0 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Fri Feb 14 19:51:38 2025 +0300 Merge branch 'SPython' into SPython-Context-Change commit e70cb99145120df29d1ae172d1b00afa8ea5b18f Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Fri Feb 14 19:49:18 2025 +0300 Return Back Global Keyword commit 7cf7a24b8f927cad72645e028f0e0ebc47cae328 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 12 13:15:35 2025 +0300 Fix Merge commit 89cc4551a0bcdb55eb64d244e35035134e5f6e75 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 12 13:02:06 2025 +0300 Squashed commit of the following: commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas … * Add rest of GetDesctiption methods to SPythonLanguageInformation * Add extended_new_expr allowing use without brackets for Intellisense * Add new intellisense_dotted_ident non-terminal symbol * Fix OperatorCanNotBeAppliedToThisTypes error throwing for SPython * Squashed commit of the following: commit6d15540895Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 31 17:21:18 2025 +0300 SPython в 3.11 commit1dc78980b2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Aug 27 11:23:19 2025 +0300 Flag commit0483c2dca0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 25 23:04:15 2025 +0300 Sign для беззнаковых commitdc4cbb2547Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 25 00:16:12 2025 +0300 Флаг в Graph3D.pas commit6a6c3553c2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 4 13:59:32 2025 +0300 LightPT - задачи перенес commitbf3ba7d288Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 4 12:51:30 2025 +0300 interface у Turtle.pas Команда изменения цвета и ширины commit59ed71f459Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 4 10:29:08 2025 +0300 Команды ПоменятьЦвет и ПоменятьШиринуПера теперь учитываются в Черепахе commit160dd58195Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jul 20 17:00:28 2025 +0300 fix #3324 commit6218cc8723Merge:cabe8f85e89e02b504Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jul 19 20:06:38 2025 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commitcabe8f85eeAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jul 19 20:06:25 2025 +0300 Min(1) Max(1) commit89e02b504eAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Thu Jul 17 10:08:54 2025 +0300 Update CodeCompletionActions.cs (#3323) Показ Code Completion Window по Ctrl-Space, если курсор находится сразу после точки (как сделано в Win версии). Текущее поведение - после точки ccw не показывать, только если курсор переместить на несколько символов вправо от точки. commitc080feba89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 15 16:06:58 2025 +0300 RayTracer/RayTracer3.pas commitcc266b3863Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Mon Jul 14 19:08:55 2025 +0300 Поправки в LanguageInformation (#3322) * Fix inaccuracy * Delete useless variable * Implement refreshing description before showing it in Intellisense windows * Fix inaccuracies * Add GetDescriptionForArray and GetDescriptionForDelegate in SPythonLanguageInfo * Exclude Read Write Async and Await from keywords list in Intellisense commit56d1eb5648Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sun Jul 13 18:44:29 2025 +0300 Обновление описания сущностей в Intellisense (#3321) * Implement refreshing description before showing it in Intellisense windows * Change BuildDescription in ProcScope * Fix description rebuild bug commit4cec1e7c43Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jul 13 13:13:29 2025 +0300 fix #3299 Revert incorrect pr intellisense commit20a1436129Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sun Jul 13 10:19:40 2025 +0300 Исправление неправильных изменений в LanguageInformation (#3319) * Fix inaccuracy * Delete useless variable * Implement refreshing description before showing it in Intellisense windows * Fix inaccuracies * Add GetDescriptionForArray and GetDescriptionForDelegate in SPythonLanguageInfo commit9e9a0469b3Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Thu Jul 10 18:35:07 2025 +0300 Добавление обновления описания сущностей из Intellisense перед выводом их в окошке (#3320) * Implement refreshing description before showing it in Intellisense windows * Change BuildDescription in ProcScope commite14b517e9dAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Jul 5 11:09:00 2025 +0300 Update ProcessRunner.cs -- fix for space chars in running app file name (#3317) fix pascalabcnet/pascalabcnet#ISSUE-3315 commit6fa1caa034Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sat Jul 5 11:05:34 2025 +0300 Учет случая params в TipPainterTools при подсветке (#3318) * Refactor LanguageInformation classes * Improve extension check in TipPainterTools * Refactor parsing parameters for signature help * Fix TipPainterTools Linux version * Add Params check in TipPainterTools commita1584f4f90Author: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Jul 5 11:05:10 2025 +0300 Update RobotField.pas (#3310) Адаптировано для Linux версии PABC * показываются надписи на форме в Ubuntu * шрифт надписей приведён к совместимому Sans Serif * Помощь - замена #10#13 на NewLine определяемый платформой commit19f78930edAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Thu Jul 3 20:42:47 2025 +0300 removing hard code (#3313) commitef795bbb64Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Thu Jul 3 20:39:09 2025 +0300 renaming method and adding comments (#3312) commit9d57c427acAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 30 19:33:04 2025 +0300 MainForm.Load += commit9927a0e305Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Jun 30 19:19:24 2025 +0300 fix type name comparsion (#3309) commit7614931f06Author: dmkwketx <dmkwketx@gmail.com> Date: Mon Jun 30 19:18:05 2025 +0300 Update WhatsNew 3_10_4 files: exit_param2.pas & exit_param3.pas (#3305) * Update exit_param3.pas Добавлена проверка, что числа меньше числа 2 не простые. особенно единица * Update exit_param2.pas Добавлена проверка что числа меньше числа 2 не простые. commitdccd7942b7Author: Nikolay Kuznetsov <adasoft@gmail.com> Date: Mon Jun 30 19:17:09 2025 +0300 Added ABCObjects samples to Linux build (#3306) commit0b3471daa0Author: Nikolay Kuznetsov <adasoft@gmail.com> Date: Mon Jun 30 19:16:51 2025 +0300 Delete InstallerSamples/Graphics/GraphABCLinux directory (#3307) Удалить как неиспользуемую commitd4173b0becAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sat Jun 28 16:12:28 2025 +0300 removing hard code (#3304) commit0972d09837Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sat Jun 28 16:10:29 2025 +0300 Return break, continue и exit in completion list (#3298) commit5abe6333baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Jun 26 13:25:24 2025 +0300 опечатка в комменте commitaa42e80c7fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 22:27:48 2025 +0300 2025 by commitae16484db7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 20:06:03 2025 +0300 Пересобрал commit0646c80e4aMerge:107f2c49ba389183efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 20:05:20 2025 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit107f2c49bbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 19:11:42 2025 +0300 Сделал ошибку при передаче в качестве делегата параметром обобщенной функции commitd2440264e8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 19:09:36 2025 +0300 Перенес из ошибок назад в правильные. Вернул странное недокументированное поведение присваивания обобщенной функции делегату commitda16d41c58Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jun 25 19:07:18 2025 +0300 Удалил два файла с ошибками - обобщенная функция присваивается делегату commita389183efeAuthor: Sun Serega <sunserega2@gmail.com> Date: Mon Jun 23 23:49:48 2025 +0300 Improve GitIgnoreTester output (#3295) commit63274c3c5eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 23 22:28:17 2025 +0300 Пересобрал 3.11.0.3641 commit34187755deAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 23 22:02:24 2025 +0300 fix #3290 commit6eccd661aeAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Jun 23 16:36:58 2025 +0300 3.11 version with SPython (not in installer!) commit080fca15bbAuthor: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Jun 22 20:56:22 2025 +0300 SPython 1.0 (#3274) * Squashed commit of the following: commit 115ed2e1b7b361b35f0b213688ad0838e0bffa69 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Nov 7 10:21:08 2024 +0300 Add from import Handling commit bdd3eb785e6c719201104497808e89dc20c4eacc Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Nov 3 12:59:29 2024 +0300 Add 'Import As' commit e5747aa56e359633be366887d3cf67d1ec054701 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Nov 3 11:08:50 2024 +0300 Add Ident_list to import commit 9d16fdb341b329adae45dec2bf6db04d8572675f Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sun Nov 3 10:01:13 2024 +0300 Move Import Handling to Visitor commit d8a0e8f5ee840e3ff15caafd7a456f91e1f2a962 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Nov 2 18:36:10 2024 +0300 Rename of Productions Related to Import commit 71282a457ab0c039a2f42c05249336d92ac76e7a Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Nov 2 18:33:41 2024 +0300 Move import to Statements * Add new AST visitors call template * Add syntax tree parameter * Add SpecialSyntaxTreeConverter * Add CollectNamesVisitor * Read Symbols from Semantic Tree * Add Visitor Renewaling * Fix Usage of Standard Libraries * Update AssignToVarConverterVisitor.cs * Fix Foreach Node Visitor * Refactor InterpreterVisitor (alpha version) * Add Imports Nodes for Declarations * Rename Method for Sending Object * Fix Remove in interface_node * Add ApplyConversionsAfterUsedModulesCompilation method to ILanguage interface * Rename ApplyConcreteConversions to ApplyConversions * Squashed commit of the following: commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * Move unitNames dictionary to CompilationUnit class * Implement Spython StringResorces for SyntaxTree Converters * Move post conversion method to ISyntaxTreeConverter interface * Override get_system_module in SpythonSyntaxTreeVisitor * Fix Unit and Function Having Same Name Bug * Add TimeMeasurements Programs * Swap Visitors for Supporting New Imports * Fix Function with Named Parameters Substitution * Add Error for Using Global * Fix yyloc Bug and Add SyntaxVisiters Errors * Move List Desugar from Visiter to Parser (temp) * Move List Generator Desugaring Back to Visitors * Add Args after Kvarg Error Message * Fix Parser and Visitors' Errors Messages * Moved Examples Programs * Update Name Substitution Logic * Squashed commit of the following: commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll commitfbd63efa89Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Nov 3 16:59:48 2024 +0300 NewSets Некоторые тесты надо исправить commit746c4ae2c2Author: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 21:00:42 2024 +0100 #3221 commit350d07326dAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:35:51 2024 +0100 #3221 commitaae9ab408bAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Thu Oct 31 18:25:06 2024 +0100 #3221 commit1e4a811e04Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:42:59 2024 +0100 test for #3219 commitd1a1247ecdAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Oct 30 20:24:16 2024 +0100 #3219 commit13b3071d80Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Oct 28 22:42:17 2024 +0300 закомментировал extensions преобразования arr to set. Надеюсь в новой реализации всё исправить commit6d5c18f457Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Oct 24 10:17:48 2024 +0300 SF XLSX.pas commit0c773a7ecbAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 16 12:04:33 2024 +0300 tree.xml с парой новых узлов для Питона commit53b3fd0881Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Oct 9 14:09:01 2024 +0300 Добавил временное преобразование от array of T в set of T commit271d5792ceAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Tue Oct 8 10:00:14 2024 +0300 Documentation (#3211) * Add Compiler documentation * Add Intellisense documentation * Move documentation folder to root directory commit79f9ab73a0Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Oct 5 15:33:20 2024 +0300 PT4_32 commit0a20c8d32cAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Sep 26 09:02:31 2024 +0200 Add `.DistinctBy` (#3122) commit11981dbf47Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Sep 25 11:53:02 2024 +0300 IndexMinBy, IndexMaxBy MinBy, MaxBy - более эффективная реализация GraphWPF - SaveToClipboard commit3eb1d2bd85Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 17:42:09 2024 +0200 #3197 commit20edd487e3Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 12:39:03 2024 +0200 #3204 commit7261231c9cMerge:7debbe7029ab932977Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Sep 22 09:49:58 2024 +0200 Merge pull request #3207 from AlexanderZemlyak/fix_linux_version Fix linux version commit9ab9329771Author: AlexanderZemlyak <zemlyaksanya@mail.ru> Date: Sun Sep 22 10:23:18 2024 +0300 Add new projects in PascalACBNETLinux.sln commit7debbe702aAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 21 14:29:38 2024 +0300 Критическое обновление LightPT commit40335b873eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Sep 20 22:58:46 2024 +0300 LightPT - OutputListIsClearedFromSpaces := False; Coords - DrawLine commit078281db17Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 22:42:44 2024 +0300 coords suite commit8d51f999a5Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Sep 19 20:28:28 2024 +0300 Автоклассы - разрешение наследования от классов без полей Модуль Coords commit8f7e92d418Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Sep 16 08:25:43 2024 +0300 Turtle переделал на паттерн Команда commita6f6d8a90bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 23:11:54 2024 +0300 Правки рейтинга в TeacherPlugin commit2365eb3633Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Sep 7 15:54:15 2024 +0300 LinkLabel в TeacherControlPlugin commit1835b811efAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:51:44 2024 +0300 MathNet Signed commitb23d6df9e9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Sep 3 23:16:15 2024 +0300 MathNet.Numerics.dll commit790fba67b8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 27 17:56:09 2024 +0300 3.10.0 commit1ec4204fd2Author: Sun Serega <sunserega2@gmail.com> Date: Mon Aug 26 09:20:27 2024 +0300 `.Batch` cleanup (#3108) commitb5e674c311Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:12:14 2024 +0300 3_10_0 commit7face043cfAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Mon Aug 26 09:11:08 2024 +0300 ToSet commite456ad528eAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 23:13:57 2024 +0300 3.9.0.3530 commit3247469e6dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 22:55:27 2024 +0300 Добавлен DrawPoints в Turtle Исправлена ошибка с отображением подписей в Y-координате commit7548142623Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 14:27:53 2024 +0300 1. Глобально. SetDecimalSeparator(',') SetNumberFormat(DecimalSeparator := ',' и куча других параметров) s.ToReal(nfi) s.ToReals(nfi) StrToReal(nfi) StrToFloat(nfi) FloatToStr(nfi) var nfi := NumberFormat(DecimalSeparator := ',') s.ToReal(DecimalSeparator := ',') s.ToReals(DecimalSeparator := ',') StrToReal(DecimalSeparator := ',') commitd94885b950Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Aug 24 12:13:09 2024 +0300 randomElement для строк .ToReals - разделителями могут быть пробел табуляция и переход на новую строку NumberFormat - функция, возвращающая nfi commitae2e26acf8Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Aug 23 19:33:55 2024 +0300 PT4 - новые dll файлы старых заданий серий A commit0f8aa6fa3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 17:28:05 2024 +0300 SetOf как основной синоним HSet commitdb4b53be20Merge:86852e0a5b9fd59a84Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:42 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit86852e0a59Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 18 16:05:14 2024 +0300 School - ToBase(number: int64 commitb9fd59a840Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 15:08:44 2024 +0200 #2830 commit4f0b0f8ba0Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 14:43:49 2024 +0200 #3194 commite3ee0fed4cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 13:49:30 2024 +0200 #3097 commitd396c4a9feAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Aug 13 10:40:23 2024 +0200 #3178 commit0d846d2335Merge:e91e35398a65a86921Author: Ivan Bondarev <ibond84@googlemail.com> Date: Mon Aug 12 15:24:11 2024 +0200 Merge pull request #3170 from samuraiGH/ForeachResolver-rework Foreach resolver rework commita65a869211Author: samuraiGH <anonimajzer3@mail.ru> Date: Mon Aug 12 15:50:42 2024 +0300 increasing pcu file version commite91e353984Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Aug 11 15:21:29 2024 +0300 Обновленный модуль Turtle.pas commitc18238df39Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 20:18:57 2024 +0300 3.9.0.3523 commit1da2b524a6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Aug 6 19:34:10 2024 +0300 School PrimeDivisors commit47c61d8b14Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:48:07 2024 +0300 New directive to disable linking pascal standard modules (#3186) * Add new 'disable standard units' directive and it's processing * Refactor InitializeNewUnit function * Improve disable standard units directive checks * Add null check in programs.cs to avoid error * Rename error related to disable standard units directive * Add referencing standard net libraries * Add checks for duplicates when injecting references commitfc3ab96caeAuthor: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Fri Aug 2 10:46:40 2024 +0300 Delete DocumentedUnits option and Exclude HelpBuilder project (#3192) * Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug Достаточно их аналогов из CompilerOptions. * Add recreating CompilerOptions when reloading Compiler * Change Rebuild checkbox logic * Delete documented units fiels from CompilerInternalDebug * Revert "Delete CodeGeneration and PCUGenerate options from CompilerInternalDebug" This reverts commit 25e92b22722b7e251ab0156148fdf28ee3175c27. * Exclude HelpBuilder commit64acde6460Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 18:21:04 2024 +0300 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса) School - IsPrime(n) commit3db5709101Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jul 31 10:56:18 2024 +0300 ZipCartesianFuncs.pas commitc4fd47128bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Jul 30 22:56:03 2024 +0300 Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией Zip, Cartesian - методы расширения дополнены чтобы было как во внешних Перегенерирована справка commit7d66f26d4fAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Mon Jul 1 00:16:43 2024 +0300 cleanup and more tests commit464dc794a8Author: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 23:31:28 2024 +0300 cleanup and more comments commit32f126370cAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sun Jun 30 21:35:06 2024 +0300 attempt to fix GetEnumerator resolving for Pascal types commitfb3eeeb28bAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 16:26:35 2024 +0300 fix tests commit84b0dfe537Author: samuraiGH <anonimajzer3@mail.ru> Date: Sat Jun 29 15:49:13 2024 +0300 fix getting MethodInfo commit5fa4d9fce7Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:45:07 2024 +0300 cold fix set of T resolving commit460ce636abAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 22:21:06 2024 +0300 hot fix set of T resolving commit83c2f29ac6Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:53:11 2024 +0300 fix method filtering again commitc840a1a47aAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 21:32:41 2024 +0300 fix type recovery commit2436627fddAuthor: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 19:18:32 2024 +0300 fixing method filtering commit15a05360a4Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:25:39 2024 +0300 attempt to fix GetEnumerator resolving for compiled types commit4fd020d084Author: samuraiGH <anonimajzer3@mail.ru> Date: Fri Jun 28 17:21:00 2024 +0300 adding tests * feat(bin/LanguageKits/SPython): add more things to installer * Change get_system_module method visibility (and some more) * Update SPython language names * Add CaseSensitive boolean saving in pcu * Implement case sensitive symbol table * Fix Create function not found error * Delete try/catch block in CollectNamesFromUsedUnits to make code cleaner * Create languageCaseSensitive field in pcu * Create CompilationArtifacts struct for passing data to ConvertAfterUsedModulesCompilation * Fix GraphWPF importing problem by dirty workaround !!! * Squashed commit of the following: commit 57ff5ef37d04ce8fcac8705c5a693bddf2ecf10e Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Feb 27 12:56:53 2025 +0300 Fix Global Variables Type Definition Основная программа выносится в функцию, определяемой самой первой и first_assignment_defines_type выводит тип глобальных переменных корректно commit 6f93ae8d6afc1c685d602b85ba6d455d862b35af Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 26 17:33:10 2025 +0300 Replace same_type_node, Fix Procedure Assignment commit 52a096394cfdd4d8e4b27ddd36570b45b053c380 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Thu Feb 20 13:59:16 2025 +0300 Fix Local Scope in If Node commit a0be5bed7f110314c0e512d28a76e3bd87328f01 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 16:40:50 2025 +0300 Fix Bug with same_type_node commit 04fd2b2a6667bf06af02614a2fd30d0b50172a0c Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 16:09:27 2025 +0300 Fix Assignment for New Variables commit ea591e243a5a458d6d94e665cec50d9ef60e1a08 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 15:58:45 2025 +0300 Fix Assignment for Imported Variables in Functions commit e5d71be7693c527e6f4cd88671503dafa0ac9777 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 15:13:21 2025 +0300 Fix SPython's Syntax Node Erasion commit c78649ac7e7883860ce459cb31f9d9e46194f203 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 14:35:53 2025 +0300 Fix Variables from Module Assignment commit 4890f7f163a2557bc58d6e9c48cb432c6436a3aa Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 13:36:53 2025 +0300 Return RetainUsedGlobalVariablesVisitor commit e5460edf2fae002ccc64d261bbb8fadb27deec12 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 13:05:38 2025 +0300 Add Errors for Wrong Global Usage commit e32387e1356cc1e330518c57ab895f89b9de1784 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 12:33:55 2025 +0300 Update Comments about Syntax Visitors commit 1f6c7ac2d8c891d582cbe957ed2ad6886de27de1 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Sat Feb 15 12:27:59 2025 +0300 Fix Global Variables read access for global variables in fuctions by default commit e840610a25718ba12df144948bdda175cbc8d7c5 Merge: e70cb9914 6c81b45c0 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Fri Feb 14 19:51:38 2025 +0300 Merge branch 'SPython' into SPython-Context-Change commit e70cb99145120df29d1ae172d1b00afa8ea5b18f Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Fri Feb 14 19:49:18 2025 +0300 Return Back Global Keyword commit 7cf7a24b8f927cad72645e028f0e0ebc47cae328 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 12 13:15:35 2025 +0300 Fix Merge commit 89cc4551a0bcdb55eb64d244e35035134e5f6e75 Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Date: Wed Feb 12 13:02:06 2025 +0300 Squashed commit of the following: commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> … * Fix %%MAIN%% function source context * Fix case sensitivity for CompiledScope search methods * Fix imported aliases hints * Implement list standard container as wrapper * Implement set standard container as wrapper * Implement dict standard container as wrapper * Improve set operations speed * Move list, set and dict functions to SPythonHidden Нужно будет перенести куда-то в другое место потом для красоты * Fix type function in SPythonSystem * Increase the priority of functions over the type conversion operation in ExpressionVisitor * Fix generic type search in SymScope internal find * Toggle AddStandardNetNamespacesToUserScope for SPython Пришлось включить подсказку пр-в имен для корректной работы семантического Intellisense. * Fix itertools --------- Co-authored-by: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com> Co-authored-by: Владислав Крылов <krylov@sfedu.ru> Co-authored-by: Sun Serega <sunserega2@gmail.com>
8351 lines
317 KiB
C#
8351 lines
317 KiB
C#
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||
using PascalABCCompiler;
|
||
using PascalABCCompiler.Parsers;
|
||
using PascalABCCompiler.SyntaxTree;
|
||
using PascalABCCompiler.TreeRealization;
|
||
using System;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Reflection;
|
||
|
||
namespace CodeCompletion
|
||
{
|
||
public enum KeywordKind
|
||
{
|
||
kw_none,
|
||
kw_new,
|
||
kw_proc,
|
||
kw_constr,
|
||
kw_destr,
|
||
kw_uses,
|
||
kw_inherited,
|
||
kw_raise,
|
||
kw_type,
|
||
kw_var,
|
||
kw_unit,
|
||
kw_punkt,
|
||
kw_colon,
|
||
kw_const,
|
||
kw_program,
|
||
kw_of,
|
||
kw_typedecl
|
||
}
|
||
|
||
|
||
|
||
public class ExtensionMethodsCache
|
||
{
|
||
|
||
}
|
||
|
||
class TypeUtility
|
||
{
|
||
public static bool IsStandType(Type t)
|
||
{
|
||
if (t.IsEnum) return false;
|
||
switch (Type.GetTypeCode(t))
|
||
{
|
||
case TypeCode.Int32:
|
||
case TypeCode.Double:
|
||
case TypeCode.Boolean:
|
||
case TypeCode.String:
|
||
case TypeCode.Char:
|
||
case TypeCode.Byte:
|
||
case TypeCode.SByte:
|
||
case TypeCode.Int16:
|
||
case TypeCode.Int64:
|
||
case TypeCode.UInt16:
|
||
case TypeCode.UInt32:
|
||
case TypeCode.UInt64:
|
||
case TypeCode.Single: return true;
|
||
}
|
||
if (t.IsPointer) return true;
|
||
return false;
|
||
}
|
||
public static string GetTypeName(Type ctn)
|
||
{
|
||
TypeCode tc = Type.GetTypeCode(ctn);
|
||
if (ctn.FullName == null && !ctn.IsArray && !ctn.IsGenericTypeDefinition)
|
||
return "T";
|
||
if (!ctn.IsEnum)
|
||
switch (tc)
|
||
{
|
||
case TypeCode.Int32: return StringConstants.integer_type_name;
|
||
case TypeCode.Double: return StringConstants.real_type_name;
|
||
case TypeCode.Boolean: return StringConstants.bool_type_name;
|
||
case TypeCode.String: return StringConstants.string_type_name;
|
||
case TypeCode.Char: return StringConstants.char_type_name;
|
||
case TypeCode.Byte: return StringConstants.byte_type_name;
|
||
case TypeCode.SByte: return StringConstants.sbyte_type_name;
|
||
case TypeCode.Int16: return StringConstants.short_type_name;
|
||
case TypeCode.Int64: return StringConstants.long_type_name;
|
||
case TypeCode.UInt16: return StringConstants.ushort_type_name;
|
||
case TypeCode.UInt32: return StringConstants.uint_type_name;
|
||
case TypeCode.UInt64: return StringConstants.ulong_type_name;
|
||
case TypeCode.Single: return StringConstants.float_type_name;
|
||
}
|
||
else return ctn.FullName;
|
||
|
||
if (ctn.Name.Contains("`"))
|
||
{
|
||
int len = ctn.GetGenericArguments().Length;
|
||
Type[] gen_ps = ctn.GetGenericArguments();
|
||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||
sb.Append(ctn.Namespace + "." + ctn.Name.Substring(0, ctn.Name.IndexOf('`')));
|
||
sb.Append('<');
|
||
for (int i = 0; i < len; i++)
|
||
{
|
||
sb.Append(gen_ps[i].Name);
|
||
if (i < len - 1)
|
||
sb.Append(',');
|
||
}
|
||
sb.Append('>');
|
||
return sb.ToString();
|
||
}
|
||
if (ctn.IsArray) return "array of " + GetTypeName(ctn.GetElementType());
|
||
if (ctn == Type.GetType("System.Void*")) return StringConstants.pointer_type_name;
|
||
return ctn.FullName;
|
||
}
|
||
|
||
public static string GetShortTypeName(Type ctn)
|
||
{
|
||
TypeCode tc = Type.GetTypeCode(ctn);
|
||
if (ctn.FullName == null && !ctn.IsArray && !ctn.IsGenericTypeDefinition)
|
||
return "T";
|
||
if (ctn.IsEnum) return ctn.Name;
|
||
|
||
if (ctn.Name.Contains("`"))
|
||
{
|
||
int len = ctn.GetGenericArguments().Length;
|
||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||
sb.Append(ctn.Name.Substring(0, ctn.Name.IndexOf('`')));
|
||
sb.Append('<');
|
||
sb.Append('>');
|
||
/*sb.Append('<');
|
||
for (int i=0; i<len; i++)
|
||
{
|
||
sb.Append('T');
|
||
if (i<len-1)
|
||
sb.Append(',');
|
||
}
|
||
sb.Append('>');*/
|
||
return sb.ToString();
|
||
}
|
||
//if (ctn.IsArray) return "array of "+GetTypeName(ctn.GetElementType());
|
||
//if (ctn == Type.GetType("System.Void*")) return StringConstants.pointer_type_name;
|
||
return ctn.Name;
|
||
}
|
||
|
||
public static string GetTopScopeName(SymScope sc)
|
||
{
|
||
if (sc == null || sc.si == null) return "";
|
||
if (sc.si.name == "" || sc.si.name.Contains("$") || sc.si.name == StringConstants.pascalSystemUnitName) return "";
|
||
if (sc is ProcScope) return "";
|
||
return sc.si.name + ".";
|
||
}
|
||
}
|
||
|
||
|
||
|
||
public class SymScope : IBaseScope
|
||
{
|
||
public SymScope topScope;
|
||
public string file_name;
|
||
public List<SymScope> used_units;
|
||
public SymInfo si;
|
||
public location loc;
|
||
public location head_loc;
|
||
public location body_loc;
|
||
public List<SymScope> members;
|
||
public Hashtable symbol_table;
|
||
public int cur_line = -1;
|
||
public int cur_col = -1;
|
||
public SymScope declaringUnit;
|
||
public string documentation;
|
||
public access_modifer acc_mod;
|
||
public bool is_static = false;
|
||
public bool is_virtual = false;
|
||
public bool is_abstract = false;
|
||
public bool is_override = false;
|
||
public bool is_reintroduce = false;
|
||
|
||
public List<Position> regions;
|
||
public Dictionary<TypeScope, List<ProcScope>> extension_methods;
|
||
|
||
public SymScope() { }
|
||
|
||
public SymScope(SymInfo si, SymScope topScope)
|
||
{
|
||
this.si = si;
|
||
si.IsUnitNamespace = true;
|
||
this.topScope = topScope;
|
||
this.used_units = new List<SymScope>();
|
||
members = new List<SymScope>();
|
||
}
|
||
|
||
/// <summary>
|
||
/// Использует глубокое копирование SymInfo для создания нового экземпляра, остальное копируется поверхностно
|
||
/// </summary>
|
||
public SymScope CopyWithNewSymInfo()
|
||
{
|
||
var s = (SymScope)MemberwiseClone();
|
||
s.si = new SymInfo(si);
|
||
return s;
|
||
}
|
||
|
||
public virtual void Clear()
|
||
{
|
||
if (members != null)
|
||
members.Clear();
|
||
if (symbol_table != null)
|
||
symbol_table.Clear();
|
||
if (used_units != null)
|
||
used_units.Clear();
|
||
if (extension_methods != null)
|
||
{
|
||
foreach (TypeScope ts in extension_methods.Keys)
|
||
{
|
||
List<ProcScope> meths = extension_methods[ts];
|
||
foreach (ProcScope meth in meths)
|
||
ts.RemoveExtensionMethod(ts, meth);
|
||
}
|
||
extension_methods.Clear();
|
||
}
|
||
UnitDocCache.RemoveItem(this);
|
||
declaringUnit = null;
|
||
topScope = null;
|
||
}
|
||
|
||
IList<Position> IBaseScope.Regions
|
||
{
|
||
get
|
||
{
|
||
return regions;
|
||
}
|
||
}
|
||
|
||
IBaseScope[] IBaseScope.Members
|
||
{
|
||
get
|
||
{
|
||
if (members != null)
|
||
return members.ToArray();
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public virtual ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.None;
|
||
}
|
||
}
|
||
|
||
public access_modifer AccessModifier
|
||
{
|
||
get
|
||
{
|
||
return acc_mod;
|
||
}
|
||
}
|
||
|
||
public virtual SymInfo SymbolInfo
|
||
{
|
||
get
|
||
{
|
||
return si;
|
||
}
|
||
}
|
||
|
||
public virtual PascalABCCompiler.Parsers.SymbolKind ElemKind
|
||
{
|
||
get
|
||
{
|
||
switch (si.kind)
|
||
{
|
||
case SymbolKind.Block: return PascalABCCompiler.Parsers.SymbolKind.Block;
|
||
case SymbolKind.Class: return PascalABCCompiler.Parsers.SymbolKind.Class;
|
||
case SymbolKind.Constant: return PascalABCCompiler.Parsers.SymbolKind.Constant;
|
||
case SymbolKind.Delegate: return PascalABCCompiler.Parsers.SymbolKind.Delegate;
|
||
case SymbolKind.Enum: return PascalABCCompiler.Parsers.SymbolKind.Enum;
|
||
case SymbolKind.Event: return PascalABCCompiler.Parsers.SymbolKind.Event;
|
||
case SymbolKind.Field: return PascalABCCompiler.Parsers.SymbolKind.Field;
|
||
case SymbolKind.Interface: return PascalABCCompiler.Parsers.SymbolKind.Interface;
|
||
case SymbolKind.Method: return PascalABCCompiler.Parsers.SymbolKind.Method;
|
||
case SymbolKind.Parameter: return PascalABCCompiler.Parsers.SymbolKind.Parameter;
|
||
case SymbolKind.Property: return PascalABCCompiler.Parsers.SymbolKind.Property;
|
||
case SymbolKind.Struct: return PascalABCCompiler.Parsers.SymbolKind.Struct;
|
||
case SymbolKind.Type: return PascalABCCompiler.Parsers.SymbolKind.Type;
|
||
case SymbolKind.Variable: return PascalABCCompiler.Parsers.SymbolKind.Variable;
|
||
}
|
||
return PascalABCCompiler.Parsers.SymbolKind.Block;
|
||
}
|
||
}
|
||
|
||
public virtual string Name
|
||
{
|
||
get
|
||
{
|
||
return si.name;
|
||
}
|
||
}
|
||
|
||
public virtual string Description
|
||
{
|
||
get
|
||
{
|
||
if (si != null) return si.description;
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public IBaseScope TopScope
|
||
{
|
||
get
|
||
{
|
||
return topScope;
|
||
}
|
||
}
|
||
|
||
public virtual IElementScope MakeElementScope()
|
||
{
|
||
return new ElementScope(this);
|
||
}
|
||
|
||
public void IncreaseEndLine()
|
||
{
|
||
this.loc.end_line_num += 1;
|
||
|
||
}
|
||
|
||
protected bool IsHiddenName(string name)
|
||
{
|
||
char c = name[0];
|
||
return c == '!' || c == '#' || c == '%' || c == '<' || name.Contains("$") || name.Contains("_<>");
|
||
}
|
||
|
||
public void AddExtensionMethod(string name, ProcScope meth, TypeScope ts)
|
||
{
|
||
if (ts.original_type != null)
|
||
{
|
||
ts.original_type.AddExtensionMethod(name, meth, ts.original_type);
|
||
}
|
||
if (extension_methods == null)
|
||
extension_methods = new Dictionary<TypeScope, List<ProcScope>>();
|
||
List<ProcScope> meth_list = null;
|
||
if (ts is CompiledScope && (ts as CompiledScope).CompiledType.IsGenericType && !(ts as CompiledScope).CompiledType.IsGenericTypeDefinition)
|
||
ts = TypeTable.get_compiled_type((ts as CompiledScope).CompiledType.GetGenericTypeDefinition());
|
||
if (ts.original_type != null)
|
||
ts = ts.original_type;
|
||
if (!extension_methods.TryGetValue(ts, out meth_list))
|
||
{
|
||
meth_list = new List<ProcScope>();
|
||
extension_methods.Add(ts, meth_list);
|
||
}
|
||
meth_list.Add(meth);
|
||
}
|
||
|
||
public void RemoveExtensionMethod(TypeScope ts, ProcScope meth)
|
||
{
|
||
List<ProcScope> meth_list = null;
|
||
if (extension_methods != null && extension_methods.TryGetValue(ts, out meth_list))
|
||
{
|
||
if (meth_list.Contains(meth))
|
||
meth_list.Remove(meth);
|
||
}
|
||
}
|
||
|
||
public SymInfo[] GetSymInfosForExtensionMethods(TypeScope ts)
|
||
{
|
||
/*if (ts is ArrayScope && !(ts as ArrayScope).is_dynamic_arr)
|
||
return new SymInfo[0];*/
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
List<ProcScope> meth_list = GetExtensionMethods(ts);
|
||
for (int i = 0; i < meth_list.Count; i++)
|
||
lst.Add(meth_list[i].WithRefreshedDescription().si);
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public List<ProcScope> GetExtensionMethods(string name, TypeScope ts)
|
||
{
|
||
/*if (ts is ArrayScope && !(ts as ArrayScope).is_dynamic_arr)
|
||
return new List<ProcScope>();*/
|
||
/*List<ProcScope> meths = GetExtensionMethods(ts, name);
|
||
List<ProcScope> lst = new List<ProcScope>();
|
||
|
||
for (int i = 0; i < meths.Count; i++)
|
||
{
|
||
if (string.Compare(meths[i].si.name, name, true) == 0)
|
||
{
|
||
lst.Add(meths[i]);
|
||
}
|
||
}*/
|
||
return GetExtensionMethods(ts, name);
|
||
}
|
||
|
||
public List<ProcScope> GetExtensionMethods(TypeScope ts, string name=null)
|
||
{
|
||
StringComparison comparison = CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
|
||
|
||
if (ts is TypeSynonim)
|
||
return GetExtensionMethods((ts as TypeSynonim).actType, name);
|
||
if (ts.original_type != null)
|
||
return GetExtensionMethods(ts.original_type, name);
|
||
List<ProcScope> lst = new List<ProcScope>();
|
||
List<ProcScope> meths = null;
|
||
TypeScope tmp_ts = ts;
|
||
if (ts is ArrayScope && !(ts as ArrayScope).is_dynamic_arr && !(ts as ArrayScope).is_multi_dyn_arr)
|
||
return lst;
|
||
if (extension_methods != null)
|
||
{
|
||
while (tmp_ts != null)
|
||
{
|
||
TypeScope tmp_ts2 = tmp_ts;
|
||
if (tmp_ts is CompiledScope && (tmp_ts as CompiledScope).CompiledType.IsGenericType && !(tmp_ts as CompiledScope).CompiledType.IsGenericTypeDefinition)
|
||
tmp_ts2 = TypeTable.get_compiled_type((tmp_ts as CompiledScope).CompiledType.GetGenericTypeDefinition());
|
||
if (extension_methods.TryGetValue(tmp_ts2, out meths))
|
||
{
|
||
foreach (var meth in meths)
|
||
{
|
||
if (!lst.Contains(meth) && (name == null || meth.si.name.Equals(name, comparison)))
|
||
lst.Add(meth);
|
||
}
|
||
}
|
||
else
|
||
{
|
||
foreach (TypeScope t in extension_methods.Keys)
|
||
{
|
||
if (t.GenericTypeDefinition == tmp_ts2.GenericTypeDefinition ||
|
||
t.IsEqual(tmp_ts2) ||
|
||
(t is ArrayScope && tmp_ts2.IsArray && t.Rank == tmp_ts2.Rank) ||
|
||
( tmp_ts2 is ArrayScope && t.IsArray && tmp_ts2.Rank == t.Rank) ||
|
||
(t is TemplateParameterScope || t is UnknownScope) ||
|
||
t is FileScope && tmp_ts2 is FileScope &&
|
||
((t as FileScope).elementType == null) == ((tmp_ts2 as FileScope).elementType == null)
|
||
)
|
||
{
|
||
var meth_list = extension_methods[t];
|
||
foreach (var meth in meth_list)
|
||
{
|
||
if (!lst.Contains(meth) && (name == null || meth.si.name.Equals(name, comparison)))
|
||
lst.Add(meth);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (ts is ArrayScope && !(ts as ArrayScope).is_dynamic_arr)
|
||
tmp_ts = null;
|
||
else
|
||
tmp_ts = tmp_ts.baseScope;
|
||
}
|
||
if (ts.implemented_interfaces != null && !(ts is ArrayScope && (!(ts as ArrayScope).is_dynamic_arr || (ts as ArrayScope).Rank > 1)))
|
||
{
|
||
List<TypeScope> implemented_interfaces = new List<TypeScope>();
|
||
implemented_interfaces.AddRange(ts.implemented_interfaces);
|
||
if (ts is ArrayScope)
|
||
implemented_interfaces.Add((ts as ArrayScope).ilist);
|
||
foreach (TypeScope int_ts in implemented_interfaces)
|
||
{
|
||
TypeScope int_ts2 = int_ts;
|
||
if (int_ts is CompiledScope && (int_ts as CompiledScope).CompiledType.IsGenericType && !(int_ts as CompiledScope).CompiledType.IsGenericTypeDefinition)
|
||
int_ts2 = TypeTable.get_compiled_type((int_ts as CompiledScope).CompiledType.GetGenericTypeDefinition());
|
||
if (extension_methods.TryGetValue(int_ts2, out meths))
|
||
{
|
||
foreach (var meth in meths)
|
||
{
|
||
if (!lst.Contains(meth) && (name == null || meth.si.name.Equals(name, comparison)))
|
||
lst.Add(meth);
|
||
}
|
||
}
|
||
else
|
||
{
|
||
foreach (TypeScope t in extension_methods.Keys)
|
||
{
|
||
if (t.GenericTypeDefinition == int_ts2.GenericTypeDefinition || t.IsEqual(int_ts2) ||
|
||
(t is ArrayScope && int_ts2.IsArray && t.Rank == int_ts2.Rank) ||
|
||
(int_ts2 is ArrayScope && t.IsArray && int_ts2.Rank == t.Rank) ||
|
||
t is FileScope && int_ts2 is FileScope &&
|
||
((t as FileScope).elementType == null) == ((int_ts2 as FileScope).elementType == null))
|
||
{
|
||
var meth_list = extension_methods[t];
|
||
foreach (var meth in meth_list)
|
||
{
|
||
if (!lst.Contains(meth) && (name == null || meth.si.name.Equals(name, comparison)))
|
||
lst.Add(meth);
|
||
}
|
||
//break;
|
||
}
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
if (this.used_units != null)
|
||
for (int i = 0; i < this.used_units.Count; i++)
|
||
{
|
||
if (!hasUsesCycle(this))
|
||
{
|
||
var unit_meth_lst = this.used_units[i].GetExtensionMethods(ts, name);
|
||
foreach (var meth in unit_meth_lst)
|
||
{
|
||
if (!lst.Contains(meth) && (name == null || meth.si.name.Equals(name, comparison)))
|
||
lst.Add(meth);
|
||
}
|
||
}
|
||
|
||
}
|
||
return lst;
|
||
}
|
||
|
||
private bool hasUsesCycle(SymScope unit, int deep=0)
|
||
{
|
||
if (unit.Name == StringConstants.pascalSystemUnitName)
|
||
return true;
|
||
if (deep > 100)
|
||
return true;
|
||
if (this.used_units != null)
|
||
for (int i = 0; i < this.used_units.Count; i++)
|
||
{
|
||
if (this.used_units[i] == unit || this.used_units[i] == this)
|
||
return true;
|
||
else
|
||
{
|
||
if (this.used_units[i].hasUsesCycle(unit, deep+1))
|
||
return true;
|
||
}
|
||
|
||
}
|
||
return false;
|
||
}
|
||
|
||
public virtual bool IsAssembliesChanged()
|
||
{
|
||
return false;
|
||
}
|
||
|
||
public virtual void InitAssemblies()
|
||
{
|
||
}
|
||
|
||
public void AddUsedUnit(SymScope unit)
|
||
{
|
||
if (this.si.name != StringConstants.pascalSystemUnitName || unit is NamespaceScope)
|
||
used_units.Add(unit);
|
||
}
|
||
|
||
public virtual string GetFullName()
|
||
{
|
||
return si.name;
|
||
}
|
||
|
||
/// <summary>
|
||
/// Построение зависимого от языка описания scope и сохранение его в description, addit_name при необходимости
|
||
/// </summary>
|
||
public virtual void BuildDescription() { }
|
||
|
||
/// <summary>
|
||
/// Вызывает BuildDescription для текущего scope, если Description не равно null.
|
||
/// Документация внутри Description остается прежней.
|
||
/// </summary>
|
||
public SymScope WithRefreshedDescription()
|
||
{
|
||
// случай задания описания вручную
|
||
if (documentation != null && documentation.Length > 0 && documentation[0] == '-')
|
||
return this;
|
||
|
||
if (Description != null)
|
||
{
|
||
int ind = Description.IndexOf("\n");
|
||
|
||
string docs = null;
|
||
|
||
if (ind != -1)
|
||
{
|
||
docs = Description.Substring(ind + 1);
|
||
}
|
||
|
||
BuildDescription();
|
||
|
||
if (ind != -1)
|
||
{
|
||
si.description += "\n" + docs;
|
||
}
|
||
}
|
||
|
||
return this;
|
||
}
|
||
|
||
public virtual string GetDescription()
|
||
{
|
||
if (si != null)
|
||
return si.description;
|
||
return "";
|
||
}
|
||
|
||
public virtual void MakeSynonimDescription()
|
||
{
|
||
|
||
}
|
||
|
||
public virtual string GetDescriptionWithoutDoc()
|
||
{
|
||
return si.name;
|
||
}
|
||
|
||
public Position GetPosition()
|
||
{
|
||
Position pos = new Position();
|
||
if (loc != null)
|
||
{
|
||
pos.file_name = loc.doc.file_name;
|
||
pos.line = loc.begin_line_num;
|
||
pos.column = loc.begin_column_num;
|
||
pos.end_line = loc.end_line_num;
|
||
pos.end_column = loc.end_column_num;
|
||
}
|
||
return pos;
|
||
}
|
||
|
||
public Position GetHeaderPosition()
|
||
{
|
||
Position pos = new Position();
|
||
if (head_loc != null)
|
||
{
|
||
pos.file_name = head_loc.doc.file_name;
|
||
pos.line = head_loc.begin_line_num;
|
||
pos.column = head_loc.begin_column_num;
|
||
pos.end_line = head_loc.end_line_num;
|
||
pos.end_column = head_loc.end_column_num;
|
||
}
|
||
return pos;
|
||
}
|
||
|
||
public Position GetBodyPosition()
|
||
{
|
||
Position pos = new Position();
|
||
if (body_loc != null)
|
||
{
|
||
pos.file_name = body_loc.doc.file_name;
|
||
pos.line = body_loc.begin_line_num;
|
||
pos.column = body_loc.begin_column_num;
|
||
pos.end_line = body_loc.end_line_num;
|
||
pos.end_column = body_loc.end_column_num;
|
||
}
|
||
return pos;
|
||
}
|
||
|
||
bool IBaseScope.IsEqual(IBaseScope scope)
|
||
{
|
||
return this.IsEqual(scope as SymScope);
|
||
//return this == scope;
|
||
}
|
||
|
||
public virtual bool IsEqual(SymScope ts)
|
||
{
|
||
return this == ts;
|
||
}
|
||
|
||
public virtual void AddDocumentation(string doc)
|
||
{
|
||
try
|
||
{
|
||
if (!string.IsNullOrEmpty(doc))
|
||
{
|
||
doc = doc.Trim(' ', '\n', '\t', '\r');
|
||
if (!string.IsNullOrEmpty(doc))
|
||
{
|
||
string[] arr = doc.Split(new string[]{"!!"},StringSplitOptions.None);
|
||
if (CodeCompletionController.currentLanguageISO == "en")
|
||
{
|
||
if (arr.Length > 1)
|
||
doc = arr[1].Trim();
|
||
else
|
||
doc = "";
|
||
}
|
||
else
|
||
doc = arr[0].Trim();
|
||
}
|
||
this.documentation = doc;
|
||
if (doc.Length > 0 && doc[0] == '-')
|
||
{
|
||
string s = doc.Substring(1);
|
||
if (s.Length >= 1 && s[0] == '-')
|
||
{
|
||
si.description = null;
|
||
si.has_doc = false;
|
||
si.not_include = true;
|
||
return;
|
||
}
|
||
s = s.TrimStart(' ', '\t');
|
||
int end_ind = s.IndexOf('\n');
|
||
if (end_ind != -1)
|
||
{
|
||
si.description = s.Substring(0, end_ind);
|
||
if (end_ind < s.Length - 1)
|
||
si.description += "\n" + AssemblyDocCache.GetNormalHint(s.Substring(end_ind + 1));
|
||
}
|
||
else
|
||
si.description = s.Substring(0);
|
||
//si.describe = s.TrimStart(' ','\t');
|
||
}
|
||
else if (doc.Length > 0 && doc[0] == '<')
|
||
{
|
||
this.documentation = AssemblyDocCache.GetNormalHint(doc);
|
||
si.description += "\n" + this.documentation;
|
||
}
|
||
else
|
||
{
|
||
|
||
si.description += "\n" + doc;
|
||
}
|
||
si.has_doc = true;
|
||
}
|
||
}
|
||
catch
|
||
{
|
||
|
||
}
|
||
}
|
||
|
||
public virtual void ClearNames()
|
||
{
|
||
if (members != null)
|
||
foreach (SymScope ss in members)
|
||
if (ss is ProcScope) ss.ClearNames();
|
||
}
|
||
|
||
public virtual bool InUsesRange(int line, int column)
|
||
{
|
||
return false;
|
||
}
|
||
|
||
//proverka na vhozhdenie v scope
|
||
public virtual bool IsInScope(location loc, int line, int column)
|
||
{
|
||
if (loc == null) return false;
|
||
if (loc.begin_line_num < line && loc.end_line_num > line)
|
||
return true;
|
||
if (loc.begin_line_num > line || loc.end_line_num < line)
|
||
return false;
|
||
if (loc.begin_line_num == line && loc.end_line_num == line)
|
||
{
|
||
if (loc.begin_column_num <= column && loc.end_column_num >= column) return true;
|
||
else return false;
|
||
}
|
||
else if (loc.end_line_num != line && loc.begin_column_num <= column) return true;
|
||
else if (loc.begin_line_num != line && loc.end_column_num >= column) return true;
|
||
return false;
|
||
}
|
||
|
||
public virtual SymInfo[] GetNamesAsInBaseClass(ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public virtual bool IsChildScopeOf(SymScope ss)
|
||
{
|
||
return false;
|
||
}
|
||
|
||
IBaseScope IBaseScope.FindScopeByLocation(int line, int column)
|
||
{
|
||
return this.FindScopeByLocation(line, column);
|
||
}
|
||
|
||
public virtual SymScope FindScopeByLocation(int line, int column)
|
||
{
|
||
SymScope minScope = null;
|
||
|
||
// задает нужна ли модификация алгоритма с обходом всех кандидатов EVA
|
||
bool findMinScope = CodeCompletionController.CurrentParser.LanguageInformation.UsesFunctionsOverlappingSourceContext;
|
||
|
||
SymScope foundScope = FindScopeByLocation(line, column, ref minScope, findMinScope);
|
||
|
||
return findMinScope ? minScope?.WithRefreshedDescription() : foundScope?.WithRefreshedDescription();
|
||
}
|
||
|
||
//naiti scope po location
|
||
//algoritm lokalizueztsja scope v glubinu poka ne naidetsja istinnyj scope, soderzhashij mesto gde nahodimsja
|
||
public virtual SymScope FindScopeByLocation(int line, int column, ref SymScope minScope, bool findMinScope)
|
||
{
|
||
SymScope res = null;
|
||
|
||
cur_line = line;
|
||
cur_col = column;
|
||
if (members == null) return null;
|
||
//if (loc != null && loc.begin_line_num <= line && loc.end_line_num >= line && loc.begin_column_num <= column && loc.end_column_num >= column)
|
||
if (IsInScope(loc, line, column))
|
||
res = this;
|
||
TypeScope ts = this as TypeScope;
|
||
if (res == null && ts != null && ts.predef_loc != null && IsInScope(ts.predef_loc, line, column))
|
||
res = this;
|
||
foreach (SymScope ss in members)
|
||
if (this != ss && this.topScope != ss && ss.loc != null && (loc == null || loc != null && loc.doc != null && ss.loc.doc.file_name == loc.doc.file_name))
|
||
{
|
||
if (IsInScope(ss.loc, line, column))
|
||
{
|
||
if (this is TypeScope && ss.loc.end_line_num > loc.end_line_num)
|
||
continue;
|
||
res = ss;
|
||
|
||
SymScope tmp = ss.FindScopeByLocation(line, column, ref minScope, findMinScope);
|
||
if (tmp != null)
|
||
{
|
||
res = tmp;
|
||
}
|
||
|
||
if (!findMinScope)
|
||
return res;
|
||
|
||
UpdateMinScopeIfNeeded(ref minScope, res);
|
||
}
|
||
else if (!(ss is CompiledScope))
|
||
{
|
||
SymScope tmp = ss.FindScopeByLocation(line, column, ref minScope, findMinScope);
|
||
if (tmp != null)
|
||
{
|
||
res = tmp;
|
||
|
||
if (!findMinScope)
|
||
return res;
|
||
|
||
UpdateMinScopeIfNeeded(ref minScope, res);
|
||
}
|
||
}
|
||
}
|
||
return res;
|
||
}
|
||
|
||
/// <summary>
|
||
/// Сравнивает minScope и scopeToCompare, если второй занимает меньше строк или minScope = null, то minScope = scopeToCompare.
|
||
/// scopeToCompare не должен быть равен null
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
private static SymScope UpdateMinScopeIfNeeded(ref SymScope minScope, SymScope scopeToCompare)
|
||
{
|
||
if (minScope != null)
|
||
{
|
||
if (scopeToCompare.loc.end_line_num - scopeToCompare.loc.begin_line_num <= minScope.loc.end_line_num - minScope.loc.begin_line_num)
|
||
minScope = scopeToCompare;
|
||
}
|
||
else
|
||
{
|
||
minScope = scopeToCompare;
|
||
}
|
||
|
||
return minScope;
|
||
}
|
||
|
||
//poluchenie vseh imen posle tochki
|
||
public virtual SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in members)
|
||
{
|
||
if (ss != this && !(ss is NamespaceScope) && ss.si.kind != SymbolKind.Namespace && !IsHiddenName(ss.si.name))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
return lst.ToArray();
|
||
}
|
||
|
||
protected bool IsClassMember(SymScope scope)
|
||
{
|
||
if (scope is ProcScope && (scope as ProcScope).declaringType != null)
|
||
return true;
|
||
if (scope is ElementScope && (scope as ElementScope).declaringUnit is TypeScope)
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
protected bool IsAfterDefinition(int def_line, int def_col)
|
||
{
|
||
if (cur_line == -1 || cur_col == -1) return true;
|
||
if (cur_line > def_line) return true;
|
||
if (cur_line == def_line) return (cur_col > def_col);
|
||
return false;
|
||
}
|
||
|
||
public virtual SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in members)
|
||
{
|
||
if (ss != this && !IsHiddenName(ss.si.name))
|
||
{
|
||
if (ss.loc != null && loc != null)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0)
|
||
{
|
||
if (IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
else lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
if (topScope != null) lst.AddRange(topScope.GetNames());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public SymInfo[] GetNamesInAllTopScopesNonVirtual(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in members)
|
||
{
|
||
TypeScope ts = ss as TypeScope;
|
||
if (ss != this && !IsHiddenName(ss.si.name))
|
||
{
|
||
//if (ts != null && !is_static && ts.IsStatic)
|
||
// continue;
|
||
if (ss.loc != null && loc != null)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0)
|
||
{
|
||
if (IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else if (ts != null && ts.predef_loc != null && IsAfterDefinition(ts.predef_loc.begin_line_num, ts.predef_loc.begin_column_num))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
else lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
if (topScope != null)
|
||
lst.AddRange(topScope.GetNamesInAllTopScopes(all_names, ev, is_static));
|
||
if (used_units != null && all_names)
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
lst.AddRange(used_units[i].GetNames());
|
||
}
|
||
return lst.ToArray();
|
||
}
|
||
|
||
//poluchenie vseh imen vnutri Scope i vo vseh objemlushih scopah
|
||
//ispolzuetsja pri nazhatii ctrl+space
|
||
public virtual SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return GetNamesInAllTopScopesNonVirtual(all_names, ev, is_static);
|
||
}
|
||
|
||
public virtual SymInfo[] GetNamesAsInObject()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in members)
|
||
{
|
||
if (ss != this && !(ss is NamespaceScope) && ss.si.kind != SymbolKind.Namespace) lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
return lst.ToArray();
|
||
}
|
||
|
||
//poisk v scope IsAfterDefinition proverjaet nahoditsja li opisanie do ispolzovanija
|
||
//eto nuzhno tak kak u nas tablicy vse zapolneny
|
||
protected SymScope internal_find(string name, bool check_for_def)
|
||
{
|
||
if (name.Length > 0 && name[0] == '?')
|
||
name = name.Substring(1);
|
||
if (symbol_table != null)
|
||
{
|
||
object o = symbol_table[name];
|
||
if (o == null)
|
||
return null;
|
||
SymScope ss = null;
|
||
if (o is SymScope)
|
||
ss = o as SymScope;
|
||
else
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive)
|
||
ss = (o as List<SymScope>)[0];
|
||
else
|
||
{
|
||
List<SymScope> lst = o as List<SymScope>;
|
||
|
||
// у generic типов надо убрать префикс
|
||
string shortName = System.Text.RegularExpressions.Regex.Replace(name, @"`\d+$", "");
|
||
|
||
foreach (SymScope s in lst)
|
||
{
|
||
// Добавил второе условие с aliasName, чтобы работали подсказки для anotherName при использовании from ... import name as anotherName EVA
|
||
if (s.si.name == shortName || s.si.aliasName == shortName)
|
||
{
|
||
ss = s;
|
||
// изменил на возврат первого совпадения для стандартных типов в SPython пока они не в фиктивном модуле, а в SPythonSystem EVA
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
if (ss == null) return null;
|
||
TypeScope ts = ss as TypeScope;
|
||
if (CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive)
|
||
{
|
||
string shortName = System.Text.RegularExpressions.Regex.Replace(name, @"`\d+$", "");
|
||
|
||
if (ss.si.name != shortName && ss.si.aliasName != shortName)
|
||
return null;
|
||
}
|
||
if (ss.loc != null && loc != null && check_for_def && cur_line != -1 && cur_col != -1)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0 && this != ss)
|
||
{
|
||
if (IsClassMember(ss) || IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num) ||
|
||
ts != null && ts.predef_loc != null && IsAfterDefinition(ts.predef_loc.begin_line_num, ts.predef_loc.begin_column_num))
|
||
{
|
||
return ss;
|
||
}
|
||
else return null;
|
||
}
|
||
else return ss;
|
||
}
|
||
else return ss;
|
||
}
|
||
else
|
||
if (members != null)
|
||
foreach (SymScope ss in members)
|
||
if (string.Compare(ss.si.name, name, !CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive) == 0)
|
||
if (ss.loc != null && loc != null && check_for_def && cur_line != -1 && cur_col != -1)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, !CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive) == 0 && this != ss)
|
||
{
|
||
if (IsClassMember(ss) || IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
return ss;
|
||
}
|
||
else return null;
|
||
}
|
||
else return ss;
|
||
}
|
||
else return ss;
|
||
return null;
|
||
}
|
||
|
||
protected List<SymScope> internal_find_overloads(string name, bool check_for_def)
|
||
{
|
||
List<SymScope> names = new List<SymScope>();
|
||
if (symbol_table != null)
|
||
{
|
||
object o = symbol_table[name];
|
||
if (o == null)
|
||
return names;
|
||
List<SymScope> tmp_names = new List<SymScope>();
|
||
if (o is SymScope)
|
||
tmp_names.Add(o as SymScope);
|
||
else
|
||
tmp_names.AddRange(o as List<SymScope>);
|
||
foreach (SymScope ss in tmp_names)
|
||
if (ss.loc != null && loc != null && check_for_def && cur_line != -1 && cur_col != -1)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0 && this != ss)
|
||
{
|
||
if (IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
names.Add(ss);
|
||
}
|
||
//else return null;
|
||
}
|
||
else names.Add(ss);
|
||
}
|
||
else names.Add(ss);
|
||
}
|
||
else if (members != null)
|
||
foreach (SymScope ss in members)
|
||
if (string.Compare(ss.si.name, name, !CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive) == 0)
|
||
if (ss.loc != null && loc != null && check_for_def && cur_line != -1 && cur_col != -1)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0 && this != ss && ss.topScope != this)
|
||
{
|
||
if (IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
names.Add(ss);
|
||
}
|
||
//else return null;
|
||
}
|
||
else
|
||
names.Add(ss);
|
||
}
|
||
else
|
||
names.Add(ss);
|
||
return names;
|
||
}
|
||
|
||
ITypeScope IBaseScope.GetElementType()
|
||
{
|
||
return this.GetElementType();
|
||
}
|
||
|
||
public virtual TypeScope GetElementType()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public virtual void AddName(string name, SymScope sc)
|
||
{
|
||
//ht[name] = sc;
|
||
sc.si.name = name;
|
||
members.Add(sc);
|
||
}
|
||
|
||
IBaseScope IBaseScope.FindNameOnlyInType(string name)
|
||
{
|
||
return this.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public virtual SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return internal_find(name, false);
|
||
}
|
||
|
||
public virtual List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return internal_find_overloads(name, false);
|
||
}
|
||
|
||
public virtual SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return internal_find(name, false);
|
||
}
|
||
|
||
public virtual List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = internal_find_overloads(name, true);
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
if (used_units != null)
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
names.AddRange(used_units[i].FindOverloadNamesOnlyInType(name));
|
||
}
|
||
return names;
|
||
}
|
||
|
||
public virtual SymScope FindName(string name)
|
||
{
|
||
SymScope sc = internal_find(name, true);
|
||
if (sc != null && !(sc is InterfaceUnitScope))
|
||
return sc;
|
||
SymScope saved_sc = sc;
|
||
if (topScope != null)
|
||
return topScope.FindName(name);
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
sc = used_units[i].FindNameOnlyInType(name);
|
||
if (sc != null)
|
||
return sc;
|
||
}
|
||
return saved_sc;
|
||
}
|
||
|
||
public virtual ProcScope FindNameOnlyInUses(string name)
|
||
{
|
||
if (used_units != null)
|
||
{
|
||
foreach (SymScope ss in used_units)
|
||
{
|
||
SymScope tmp = ss.FindNameOnlyInType(name);
|
||
if (tmp != null && tmp is ProcScope)
|
||
return tmp as ProcScope;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
IBaseScope IBaseScope.FindNameInAnyOrder(string name)
|
||
{
|
||
return this.FindNameInAnyOrder(name);
|
||
}
|
||
|
||
public virtual SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
SymScope sc = internal_find(name, false);
|
||
if (sc != null && !(sc is InterfaceUnitScope))
|
||
return sc;
|
||
SymScope saved_sc = sc;
|
||
if (topScope != null)
|
||
return topScope.FindName(name);
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
sc = used_units[i].FindNameOnlyInType(name);
|
||
if (sc != null)
|
||
return sc;
|
||
}
|
||
return saved_sc;
|
||
}
|
||
}
|
||
|
||
|
||
|
||
public class InterfaceUnitScope : SymScope, IInterfaceUnitScope
|
||
{
|
||
public ImplementationUnitScope impl_scope;
|
||
private List<Assembly> ref_assms;
|
||
public location uses_source_range;
|
||
private bool is_namespace;
|
||
private List<InterfaceUnitScope> namespace_units = new List<InterfaceUnitScope>();
|
||
private InterfaceUnitScope main_namespace_unit;
|
||
|
||
public InterfaceUnitScope(SymInfo si, SymScope topScope, bool isNamespace=false, string fileName=null)
|
||
: base(si, topScope)
|
||
{
|
||
UnitDocCache.AddDescribeToComplete(this);
|
||
this.symbol_table = new Hashtable(StringComparer.CurrentCultureIgnoreCase);
|
||
is_namespace = isNamespace;
|
||
file_name = fileName;
|
||
|
||
BuildDescription();
|
||
}
|
||
|
||
~InterfaceUnitScope()
|
||
{
|
||
|
||
}
|
||
|
||
IImplementationUnitScope IInterfaceUnitScope.ImplementationUnitScope
|
||
{
|
||
get
|
||
{
|
||
return impl_scope;
|
||
}
|
||
}
|
||
|
||
public void AddNamespaceUnit(InterfaceUnitScope unit)
|
||
{
|
||
InterfaceUnitScope to_remove = null;
|
||
foreach (var un in namespace_units)
|
||
if (un.file_name == unit.file_name)
|
||
{
|
||
to_remove = un;
|
||
break;
|
||
}
|
||
if (to_remove != null)
|
||
namespace_units.Remove(to_remove);
|
||
namespace_units.Add(unit);
|
||
unit.main_namespace_unit = this;
|
||
}
|
||
|
||
public override bool InUsesRange(int line, int column)
|
||
{
|
||
if (this.uses_source_range != null)
|
||
return IsInScope(this.uses_source_range, line, this.uses_source_range.end_column_num);
|
||
return false;
|
||
}
|
||
|
||
public override void Clear()
|
||
{
|
||
if (is_namespace)
|
||
return;
|
||
base.Clear();
|
||
if (ref_assms != null)
|
||
ref_assms.Clear();
|
||
}
|
||
|
||
public override bool IsAssembliesChanged()
|
||
{
|
||
if (ref_assms != null)
|
||
foreach (Assembly a in ref_assms)
|
||
if (PascalABCCompiler.NetHelper.NetHelper.IsAssemblyChanged(a.ManifestModule.ScopeName))
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override void InitAssemblies()
|
||
{
|
||
if (ref_assms != null)
|
||
foreach (Assembly a in ref_assms)
|
||
PascalABCCompiler.NetHelper.NetHelper.init_namespaces(a);
|
||
}
|
||
|
||
public void AddReferencedAssembly(System.Reflection.Assembly assm)
|
||
{
|
||
if (ref_assms == null) ref_assms = new List<Assembly>();
|
||
ref_assms.Add(assm);
|
||
List<Type> lst = PascalABCCompiler.NetHelper.NetHelper.entry_types[assm] as List<Type>;
|
||
Type entry_type = null;
|
||
if (lst != null)
|
||
entry_type = lst[0];
|
||
if (entry_type != null)
|
||
{
|
||
NamespaceScope ns = new NamespaceScope(entry_type.Namespace);
|
||
ns.entry_type = TypeTable.get_compiled_type(new SymInfo("", SymbolKind.Type, ""), entry_type);
|
||
used_units.Add(ns);
|
||
}
|
||
}
|
||
|
||
public override void AddName(string name, SymScope sc)
|
||
{
|
||
string pure_name = name;
|
||
int ind = name.IndexOf('`');
|
||
if (ind != -1)
|
||
pure_name = name.Substring(0, ind);
|
||
sc.si.name = pure_name;
|
||
object o = symbol_table[pure_name];
|
||
if (o != null && !IsHiddenName(pure_name))
|
||
{
|
||
if (o is SymScope)
|
||
{
|
||
List<SymScope> lst = new List<SymScope>();
|
||
lst.Add(o as SymScope);
|
||
lst.Add(sc);
|
||
symbol_table[name] = lst;
|
||
if (pure_name != name)
|
||
symbol_table[pure_name] = lst;
|
||
}
|
||
else
|
||
{
|
||
(o as List<SymScope>).Add(sc);
|
||
}
|
||
}
|
||
else
|
||
{
|
||
symbol_table[name] = sc;
|
||
if (pure_name != name)
|
||
symbol_table[pure_name] = sc;
|
||
}
|
||
|
||
members.Add(sc);
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.UnitInterface;
|
||
}
|
||
}
|
||
|
||
public bool IsNamespaceUnit
|
||
{
|
||
get
|
||
{
|
||
return is_namespace;
|
||
}
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
SymInfo[] names = base.GetNamesAsInObject(ev);
|
||
if (namespace_units.Count == 0)
|
||
return names;
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.AddRange(names);
|
||
foreach (var un in namespace_units)
|
||
lst.AddRange(un.GetNamesAsInObject(ev));
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
SymInfo[] names = base.GetNames();
|
||
if (namespace_units.Count == 0)
|
||
return names;
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.AddRange(names);
|
||
foreach (var un in namespace_units)
|
||
lst.AddRange(un.GetNames());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
SymInfo[] names = base.GetNamesInAllTopScopes(all_names, ev, is_static);
|
||
if (namespace_units.Count == 0 && main_namespace_unit == null)
|
||
return names;
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.AddRange(names);
|
||
if (main_namespace_unit != null)
|
||
{
|
||
foreach (var un in main_namespace_unit.namespace_units)
|
||
if (un != this)
|
||
lst.AddRange(un.GetNamesInAllTopScopesNonVirtual(all_names, ev, is_static));
|
||
}
|
||
else
|
||
{
|
||
foreach (var un in namespace_units)
|
||
lst.AddRange(un.GetNamesInAllTopScopes(all_names, ev, is_static));
|
||
}
|
||
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
SymInfo[] names = base.GetNamesAsInObject();
|
||
if (namespace_units.Count == 0)
|
||
return names;
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.AddRange(names);
|
||
foreach (var un in namespace_units)
|
||
lst.AddRange(un.GetNamesAsInObject());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
si.description = ToString();
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser?.LanguageInformation.GetSimpleDescription(this);
|
||
}
|
||
}
|
||
|
||
public class NamespaceUnitScope : SymScope
|
||
{
|
||
public List<InterfaceUnitScope> units;
|
||
|
||
public NamespaceUnitScope(SymInfo si, SymScope topScope) : base(si, topScope)
|
||
{
|
||
units = new List<InterfaceUnitScope>();
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
foreach (InterfaceUnitScope unit in units)
|
||
{
|
||
SymScope ss = unit.FindName(name);
|
||
if (ss != null)
|
||
return ss;
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
//interfejsnyj scope
|
||
public class ImplementationUnitScope : SymScope, IImplementationUnitScope
|
||
{
|
||
public location uses_source_range;
|
||
|
||
public ImplementationUnitScope(SymInfo si, SymScope topScope)
|
||
: base(si, topScope)
|
||
{
|
||
this.symbol_table = new Hashtable(StringComparer.CurrentCultureIgnoreCase);
|
||
}
|
||
|
||
public override bool InUsesRange(int line, int column)
|
||
{
|
||
if (this.uses_source_range != null)
|
||
return IsInScope(this.uses_source_range, line, this.uses_source_range.end_column_num);
|
||
return false;
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.UnitImplementation;
|
||
}
|
||
}
|
||
|
||
//osobyj porjadok poiska
|
||
//ishem v scope, potom v usesah scopa, potom v interfacenom scope (i usesah intefejsnogo scopa)
|
||
public override SymScope FindName(string name)
|
||
{
|
||
SymScope sc = internal_find(name, true);
|
||
if (sc != null) return sc;
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
sc = used_units[i].FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
}
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = internal_find_overloads(name, true);
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
names.AddRange(used_units[i].FindOverloadNamesOnlyInType(name));
|
||
}
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override void AddName(string name, SymScope sc)
|
||
{
|
||
string pure_name = name;
|
||
int ind = name.IndexOf('`');
|
||
if (ind != -1)
|
||
pure_name = name.Substring(0, ind);
|
||
sc.si.name = pure_name;
|
||
object o = symbol_table[pure_name];
|
||
if (o != null && !IsHiddenName(pure_name))
|
||
{
|
||
if (o is SymScope)
|
||
{
|
||
List<SymScope> lst = new List<SymScope>();
|
||
lst.Add(o as SymScope);
|
||
lst.Add(sc);
|
||
symbol_table[name] = lst;
|
||
if (pure_name != name)
|
||
symbol_table[pure_name] = lst;
|
||
}
|
||
else
|
||
{
|
||
(o as List<SymScope>).Add(sc);
|
||
}
|
||
}
|
||
else
|
||
{
|
||
symbol_table[name] = sc;
|
||
if (pure_name != name)
|
||
symbol_table[pure_name] = sc;
|
||
}
|
||
|
||
members.Add(sc);
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
SymScope sc = internal_find(name, false);
|
||
if (sc != null) return sc;
|
||
for (int i = 0; i < used_units.Count; i++)
|
||
{
|
||
sc = used_units[i].FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
}
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
///element - perem, pole, parametr, svojstvo, konstanta
|
||
///takzhe obertka nad vsem ostalnym, ispolzuetsja v ExpressionVisitor
|
||
/// </summary>
|
||
public class ElementScope : SymScope, IElementScope
|
||
{
|
||
public SymScope sc;
|
||
public PascalABCCompiler.SyntaxTree.parametr_kind param_kind;
|
||
public object cnst_val;
|
||
public List<TypeScope> indexers;
|
||
public TypeScope elementType;
|
||
public bool is_readonly;
|
||
|
||
public ElementScope() { }
|
||
public ElementScope(SymInfo si, SymScope sc, SymScope topScope)
|
||
{
|
||
this.si = si;
|
||
this.sc = sc;
|
||
this.topScope = topScope;
|
||
|
||
MakeDescription();
|
||
//UnitDocCache.AddDescribeToComplete(this);
|
||
//if (sc is ProcScope) si.kind = SymbolKind.Delegate;
|
||
//si.describe = si.name + ": " + sc.ToString();
|
||
}
|
||
|
||
public ElementScope(SymInfo si, SymScope sc, object cnst_val, SymScope topScope)
|
||
{
|
||
this.si = si;
|
||
this.sc = sc;
|
||
this.topScope = topScope;
|
||
this.cnst_val = cnst_val;
|
||
MakeDescription();
|
||
//UnitDocCache.AddDescribeToComplete(this);
|
||
}
|
||
|
||
public ElementScope(SymScope sc)
|
||
{
|
||
this.si = new SymInfo("", SymbolKind.Type, "");
|
||
this.sc = sc;
|
||
if (sc != null)
|
||
this.acc_mod = sc.acc_mod;
|
||
//UnitDocCache.AddDescribeToComplete(this);
|
||
if (sc is ProcScope)
|
||
{
|
||
MakeDescription();
|
||
si.kind = SymbolKind.Delegate;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsReadOnly
|
||
{
|
||
get
|
||
{
|
||
return is_readonly;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.ElementScope;
|
||
}
|
||
}
|
||
|
||
public bool IsIndexedProperty
|
||
{
|
||
get
|
||
{
|
||
return this.ElemKind == SymbolKind.Property && indexers != null && indexers.Count > 0;
|
||
}
|
||
|
||
}
|
||
|
||
public PascalABCCompiler.SyntaxTree.parametr_kind ParamKind
|
||
{
|
||
get
|
||
{
|
||
return param_kind;
|
||
}
|
||
}
|
||
|
||
public IBaseScope Type
|
||
{
|
||
get
|
||
{
|
||
return sc;
|
||
}
|
||
}
|
||
|
||
public object ConstantValue
|
||
{
|
||
get
|
||
{
|
||
return cnst_val;
|
||
}
|
||
}
|
||
|
||
public virtual ITypeScope ElementType
|
||
{
|
||
get
|
||
{
|
||
return elementType;
|
||
}
|
||
}
|
||
|
||
public ITypeScope[] Indexers
|
||
{
|
||
get
|
||
{
|
||
return GetIndexers();
|
||
}
|
||
}
|
||
|
||
public virtual bool IsVirtual
|
||
{
|
||
get
|
||
{
|
||
return is_virtual;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsOverride
|
||
{
|
||
get
|
||
{
|
||
return is_override;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsStatic
|
||
{
|
||
get
|
||
{
|
||
return is_static;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsAbstract
|
||
{
|
||
get
|
||
{
|
||
return is_abstract;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsReintroduce
|
||
{
|
||
get
|
||
{
|
||
return is_reintroduce;
|
||
}
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
|
||
public void MakeDescription()
|
||
{
|
||
si.description = CodeCompletionController.CurrentParser?.LanguageInformation.GetDescription(this);
|
||
if (!string.IsNullOrEmpty(documentation))
|
||
si.description += Environment.NewLine + documentation;
|
||
}
|
||
|
||
public virtual void AddIndexer(TypeScope ts)
|
||
{
|
||
if (indexers == null) indexers = new List<TypeScope>();
|
||
indexers.Add(ts);
|
||
}
|
||
|
||
public virtual TypeScope[] GetIndexers()
|
||
{
|
||
if (indexers != null && indexers.Count > 0)
|
||
return indexers.ToArray();
|
||
else return new TypeScope[0];
|
||
}
|
||
|
||
public override SymScope FindName(string s)
|
||
{
|
||
if (string.Compare(si.name, s, true) == 0)
|
||
return this;
|
||
return topScope.FindName(s);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
if (string.Compare(si.name, name, true) == 0)
|
||
return new List<SymScope>() { this };
|
||
List<SymScope> names = sc.FindOverloadNames(name);
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override TypeScope GetElementType()
|
||
{
|
||
return sc.GetElementType();
|
||
}
|
||
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// return sc.GetNamesAsInObject(ev);
|
||
// }
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
return sc.GetNamesAsInObject();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
return sc.GetNamesAsInObject(ev);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return sc.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return sc.FindNameOnlyInThisType(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return sc.FindOverloadNamesOnlyInType(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
return sc.GetNamesAsInObject();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return topScope.GetNamesInAllTopScopes(all_names, ev, is_static);
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
|
||
if (this == ts)
|
||
return true;
|
||
if (this.Name != ts.Name)
|
||
return false;
|
||
|
||
ElementScope es = ts as ElementScope;
|
||
if (es == null)
|
||
return false;
|
||
if (this.sc != es.sc)
|
||
return false;
|
||
if (this.si.kind != SymbolKind.Parameter || ts.si.kind != SymbolKind.Parameter)
|
||
return false;
|
||
ProcScope ps1 = this.topScope as ProcScope;
|
||
ProcScope ps2 = es.topScope as ProcScope;
|
||
if (ps1 == null || ps2 == null)
|
||
return false;
|
||
if (ps1 == ps2 || ps1 is ProcRealization && (ps1 as ProcRealization).def_proc == ps2 || ps1.procRealization == ps2)
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser?.LanguageInformation.GetSimpleDescription(this);
|
||
}
|
||
}
|
||
|
||
//relizacija procedury delegiruet vse metody svoemu opisaniju
|
||
public class ProcRealization : ProcScope, IProcRealizationScope
|
||
{
|
||
public ProcScope def_proc;
|
||
public SymScope top_mod_scope;
|
||
|
||
public ProcRealization(ProcScope def_proc, SymScope top_mod_scope)
|
||
{
|
||
this.def_proc = def_proc;
|
||
this.top_mod_scope = top_mod_scope;
|
||
def_proc.procRealization = this;
|
||
if (def_proc != null)
|
||
this.topScope = def_proc.topScope;
|
||
this.si = new SymInfo(def_proc.si.name, def_proc.si.kind, def_proc.si.description);
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.ProcRealization;
|
||
}
|
||
}
|
||
|
||
public IProcScope DefProc
|
||
{
|
||
get
|
||
{
|
||
return def_proc;
|
||
}
|
||
}
|
||
|
||
public override bool IsVirtual
|
||
{
|
||
get
|
||
{
|
||
return def_proc.is_virtual;
|
||
}
|
||
}
|
||
|
||
public override bool IsOverride
|
||
{
|
||
get
|
||
{
|
||
return def_proc.is_override;
|
||
}
|
||
}
|
||
|
||
public override bool IsStatic
|
||
{
|
||
get
|
||
{
|
||
return def_proc.is_static;
|
||
}
|
||
}
|
||
|
||
public override bool IsAbstract
|
||
{
|
||
get
|
||
{
|
||
return def_proc.is_abstract;
|
||
}
|
||
}
|
||
|
||
public override bool IsReintroduce
|
||
{
|
||
get
|
||
{
|
||
return def_proc.is_reintroduce;
|
||
}
|
||
}
|
||
|
||
public override IElementScope[] Parameters
|
||
{
|
||
get
|
||
{
|
||
return def_proc.Parameters;
|
||
}
|
||
}
|
||
|
||
public override void AddName(string name, SymScope sc)
|
||
{
|
||
//ht[name] = sc;
|
||
def_proc.AddName(name, sc);
|
||
}
|
||
|
||
public override bool IsConstructor()
|
||
{
|
||
return def_proc.IsConstructor();
|
||
}
|
||
|
||
public override void AddParameter(ElementScope par)
|
||
{
|
||
def_proc.AddParameter(par);
|
||
}
|
||
|
||
public override void ClearNames()
|
||
{
|
||
def_proc.ClearNames();
|
||
}
|
||
|
||
public override SymScope FindScopeByLocation(int line, int column, ref SymScope minScope, bool findMinScope)
|
||
{
|
||
return def_proc.FindScopeByLocation(line, column, ref minScope, findMinScope);
|
||
}
|
||
|
||
public override string GetDescriptionWithoutDoc()
|
||
{
|
||
string s = def_proc.GetDescriptionWithoutDoc();
|
||
if (def_proc.topScope is TypeScope)
|
||
{
|
||
return TypeUtility.GetTopScopeName(def_proc.topScope) + s;
|
||
}
|
||
return s;
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
//SymScope sc = ht[name] as SymScope;
|
||
/*SymScope sc = def_proc.FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
if (top_mod_scope != null)
|
||
return top_mod_scope.FindName(name);
|
||
return null;*/
|
||
return def_proc.FindName(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
//SymScope sc = ht[name] as SymScope;
|
||
return def_proc.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
//SymScope sc = ht[name] as SymScope;
|
||
return def_proc.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
return def_proc.GetNamesAsInObject();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
return def_proc.GetNamesAsInObject(ev);
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> names = new List<SymInfo>();
|
||
names.AddRange(def_proc.GetNames());
|
||
if (top_mod_scope != null)
|
||
names.AddRange(top_mod_scope.GetNames());
|
||
return names.ToArray();
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
SymScope sc = def_proc.FindNameInAnyOrder(name);
|
||
if (sc != null) return sc;
|
||
if (top_mod_scope != null) return top_mod_scope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override int GetParametersCount()
|
||
{
|
||
return def_proc.GetParametersCount();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInBaseClass(ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return def_proc.GetNamesAsInBaseClass(ev, is_static);
|
||
}
|
||
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// List<SymInfo> names = new List<SymInfo>();
|
||
// names.AddRange(def_proc.GetNames(ev));
|
||
// if (top_mod_scope != null)
|
||
// names.AddRange(top_mod_scope.GetNames(ev));
|
||
// return names.ToArray();
|
||
// }
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> names = new List<SymInfo>();
|
||
//names.AddRange(def_proc.GetNamesInAllTopScopes(all_names,ev,is_static));
|
||
names.AddRange(def_proc.GetNames());
|
||
if (top_mod_scope != null)
|
||
names.AddRange(top_mod_scope.GetNamesInAllTopScopes(all_names, ev, is_static));
|
||
return names.ToArray();
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
return def_proc.FindOverloadNames(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return def_proc.FindOverloadNamesOnlyInType(name);
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
return def_proc.IsEqual(ts);
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
def_proc.BuildDescription();
|
||
|
||
si.description = def_proc.Description;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return def_proc.ToString();
|
||
}
|
||
}
|
||
|
||
public class IndexedPropertyType : TypeScope
|
||
{
|
||
public TypeScope propertyType;
|
||
|
||
public IndexedPropertyType(TypeScope propertyType)
|
||
{
|
||
this.propertyType = propertyType;
|
||
}
|
||
}
|
||
|
||
public class ProcType : TypeScope, IProcType
|
||
{
|
||
public ProcScope target;
|
||
private CompiledScope parent;
|
||
private ProcScope invokeMeth;
|
||
|
||
public ProcType(ProcScope target)
|
||
{
|
||
this.target = target;
|
||
this.si = new SymInfo(this.ToString(), SymbolKind.Delegate, this.ToString());
|
||
this.parent = TypeTable.get_compiled_type(PascalABCCompiler.NetHelper.NetHelper.MulticastDelegateType);
|
||
|
||
}
|
||
|
||
public ProcType(ProcScope target, List<string> generic_params):this(target)
|
||
{
|
||
this.generic_params = generic_params;
|
||
}
|
||
|
||
IProcScope IProcType.Target
|
||
{
|
||
get
|
||
{
|
||
return target;
|
||
}
|
||
}
|
||
|
||
public override bool IsDelegate
|
||
{
|
||
get
|
||
{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
public override PascalABCCompiler.Parsers.SymbolKind ElemKind
|
||
{
|
||
get { return PascalABCCompiler.Parsers.SymbolKind.Delegate; }
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Delegate;
|
||
}
|
||
}
|
||
|
||
public ProcScope InvokeMethod
|
||
{
|
||
get
|
||
{
|
||
if (invokeMeth == null)
|
||
{
|
||
invokeMeth = new ProcScope("Invoke", target);
|
||
invokeMeth.declaringType = parent;
|
||
invokeMeth.parameters = target.parameters;
|
||
invokeMeth.return_type = target.return_type;
|
||
invokeMeth.is_virtual = true;
|
||
invokeMeth.Complete();
|
||
}
|
||
return invokeMeth;
|
||
}
|
||
}
|
||
|
||
private ProcScope beginInvokeMethod;
|
||
private ProcScope endInvokeMethod;
|
||
|
||
public ProcScope BeginInvokeMethod
|
||
{
|
||
get
|
||
{
|
||
if (beginInvokeMethod == null)
|
||
{
|
||
beginInvokeMethod = new ProcScope("BeginInvoke", target);
|
||
beginInvokeMethod.declaringType = parent;
|
||
beginInvokeMethod.parameters = new List<ElementScope>();
|
||
beginInvokeMethod.parameters.Add(new ElementScope(new SymInfo("callback",SymbolKind.Parameter,"callback"), TypeTable.get_compiled_type(typeof(AsyncCallback)),beginInvokeMethod));
|
||
beginInvokeMethod.parameters.Add(new ElementScope(new SymInfo("object", SymbolKind.Parameter, "object"), TypeTable.obj_type, beginInvokeMethod));
|
||
beginInvokeMethod.return_type = TypeTable.get_compiled_type(typeof(IAsyncResult));
|
||
beginInvokeMethod.is_virtual = true;
|
||
beginInvokeMethod.Complete();
|
||
}
|
||
return beginInvokeMethod;
|
||
}
|
||
}
|
||
|
||
public ProcScope EndInvokeMethod
|
||
{
|
||
get
|
||
{
|
||
if (endInvokeMethod == null)
|
||
{
|
||
endInvokeMethod = new ProcScope("EndInvoke", target);
|
||
endInvokeMethod.declaringType = parent;
|
||
endInvokeMethod.parameters = new List<ElementScope>();
|
||
endInvokeMethod.parameters.Add(new ElementScope(new SymInfo("result", SymbolKind.Parameter, "result"), TypeTable.get_compiled_type(typeof(IAsyncResult)), endInvokeMethod));
|
||
|
||
//endInvokeMethod.return_type = TypeTable.get_compiled_type(typeof(IAsyncResult));
|
||
endInvokeMethod.is_virtual = true;
|
||
endInvokeMethod.Complete();
|
||
}
|
||
return endInvokeMethod;
|
||
}
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return this;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> lst = new List<SymScope>();
|
||
if (string.Compare(name, "Invoke", true) == 0)
|
||
lst.Add(InvokeMethod);
|
||
else if (string.Compare(name, "BeginInvoke", true) == 0)
|
||
lst.Add(BeginInvokeMethod);
|
||
else if (string.Compare(name, "EndInvoke", true) == 0)
|
||
lst.Add(EndInvokeMethod);
|
||
else
|
||
lst.AddRange(parent.FindOverloadNames(name));
|
||
return lst;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
List<SymScope> lst = new List<SymScope>();
|
||
if (string.Compare(name, "Invoke", true) == 0)
|
||
lst.Add(InvokeMethod);
|
||
else if (string.Compare(name, "BeginInvoke", true) == 0)
|
||
lst.Add(BeginInvokeMethod);
|
||
else if (string.Compare(name, "EndInvoke", true) == 0)
|
||
lst.Add(EndInvokeMethod);
|
||
else
|
||
lst.AddRange(parent.FindOverloadNamesOnlyInType(name));
|
||
return lst;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.Add(InvokeMethod.si);
|
||
lst.Add(BeginInvokeMethod.si);
|
||
lst.Add(EndInvokeMethod.si);
|
||
lst.AddRange(parent.GetNames());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return parent.GetNames(ev, keyword, called_in_base);
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.Add(InvokeMethod.si);
|
||
lst.Add(BeginInvokeMethod.si);
|
||
lst.Add(EndInvokeMethod.si);
|
||
lst.AddRange(parent.GetNamesAsInObject());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
lst.Add(InvokeMethod.si);
|
||
lst.Add(BeginInvokeMethod.si);
|
||
lst.Add(EndInvokeMethod.si);
|
||
lst.AddRange(parent.GetNamesAsInObject(ev));
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
return topScope.FindName(name);
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
return parent.FindNameInAnyOrder(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return parent.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return parent.FindNameOnlyInThisType(name);
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (IsEqual(ts))
|
||
return true;
|
||
if (ts is CompiledScope)
|
||
return ts.IsConvertable(this, strong);
|
||
if (ts is TemplateParameterScope || ts.IsGenericParameter)
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is NullTypeScope)
|
||
return true;
|
||
if (ts is TypeSynonim)
|
||
return this.IsEqual((ts as TypeSynonim).actType);
|
||
if (ts is ProcType)
|
||
return target.IsParamsEquals((ts as ProcType).target);
|
||
if (ts is CompiledScope)
|
||
return ts.IsEqual(this);
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser?.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
//procedura-funcija-metod
|
||
public class ProcScope : SymScope, IProcScope
|
||
{
|
||
public string name;
|
||
public List<ElementScope> parameters;
|
||
public TypeScope return_type;
|
||
public ProcScope nextProc;//sled. peregruzhennaja procedura
|
||
public bool is_constructor;
|
||
public bool is_forward = false;
|
||
public bool already_defined = false;//sush. li realizacija
|
||
public ProcRealization procRealization;//ssylka na realizaciju
|
||
public List<string> template_parameters;
|
||
public TypeScope declaringType;
|
||
public bool is_extension = false;
|
||
public List<string> generic_params;
|
||
public List<string> generic_args;
|
||
public ProcScope original_function;
|
||
|
||
public ProcScope()
|
||
{
|
||
|
||
}
|
||
|
||
public ProcScope(string name, SymScope topScope)
|
||
{
|
||
this.name = name;
|
||
this.topScope = topScope;
|
||
this.si = new SymInfo(name, SymbolKind.Method, name);
|
||
//this.si.name = CodeCompletionController.CurrentParser.LanguageInformation.GetShortName(this);
|
||
parameters = new List<ElementScope>();
|
||
members = new List<SymScope>();
|
||
//UnitDocCache.AddDescribeToComplete(this);
|
||
if (topScope is TypeScope) declaringType = topScope as TypeScope;
|
||
}
|
||
|
||
public ProcScope(string name, SymScope topScope, bool is_constructor)
|
||
{
|
||
this.name = name;
|
||
this.topScope = topScope;
|
||
this.si = new SymInfo(name, SymbolKind.Method, name);
|
||
//this.si.name = CodeCompletionController.CurrentParser.LanguageInformation.GetShortName(this);
|
||
parameters = new List<ElementScope>();
|
||
members = new List<SymScope>();
|
||
this.is_constructor = is_constructor;
|
||
//UnitDocCache.AddDescribeToComplete(this);
|
||
if (topScope is TypeScope) declaringType = topScope as TypeScope;
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Procedure;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsVirtual
|
||
{
|
||
get
|
||
{
|
||
return is_virtual;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsExtension
|
||
{
|
||
get { return is_extension; }
|
||
}
|
||
|
||
public virtual bool IsOverride
|
||
{
|
||
get
|
||
{
|
||
return is_override;
|
||
}
|
||
}
|
||
|
||
public bool OfTypeInstance
|
||
{
|
||
get
|
||
{
|
||
return original_function != null || declaringType != null && declaringType.instances != null && declaringType.instances.Count > 0;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsStatic
|
||
{
|
||
get
|
||
{
|
||
return is_static;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsAbstract
|
||
{
|
||
get
|
||
{
|
||
return is_abstract;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsReintroduce
|
||
{
|
||
get
|
||
{
|
||
return is_reintroduce;
|
||
}
|
||
}
|
||
|
||
ITypeScope IProcScope.DeclaringType
|
||
{
|
||
get
|
||
{
|
||
return declaringType;
|
||
}
|
||
}
|
||
|
||
public virtual IElementScope[] Parameters
|
||
{
|
||
get
|
||
{
|
||
if (parameters != null)
|
||
return parameters.ToArray();
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public virtual string[] TemplateParameters
|
||
{
|
||
get
|
||
{
|
||
if (template_parameters != null)
|
||
return template_parameters.ToArray();
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public virtual IProcScope NextFunction
|
||
{
|
||
get
|
||
{
|
||
return nextProc;
|
||
}
|
||
}
|
||
|
||
public virtual ITypeScope ReturnType
|
||
{
|
||
get
|
||
{
|
||
return return_type;
|
||
}
|
||
}
|
||
|
||
public IProcRealizationScope Realization
|
||
{
|
||
get
|
||
{
|
||
return procRealization;
|
||
}
|
||
}
|
||
|
||
public override void ClearNames()
|
||
{
|
||
members.Clear();
|
||
//members
|
||
}
|
||
|
||
public override bool IsInScope(location loc, int line, int column)
|
||
{
|
||
bool res = base.IsInScope(loc, line, column);
|
||
if (res)
|
||
return res;
|
||
if (procRealization != null && procRealization != this)
|
||
return procRealization.IsInScope(loc, line, column);
|
||
return false;
|
||
}
|
||
|
||
public ProcScope GetInstance(List<TypeScope> gen_args)
|
||
{
|
||
List<string> template_parameters = this.template_parameters;
|
||
if ((this.template_parameters == null || this.template_parameters.Count == 0))
|
||
{
|
||
bool has_instance = false;
|
||
if (this.topScope is TypeScope)
|
||
{
|
||
TypeScope ts = this.topScope as TypeScope;
|
||
if (ts.instances != null && ts.instances.Count > 0 && gen_args.Count > 0)
|
||
{
|
||
has_instance = true;
|
||
gen_args = ts.instances;
|
||
template_parameters = new List<string>(ts.TemplateArguments);
|
||
}
|
||
|
||
}
|
||
if (!has_instance)
|
||
return this;
|
||
}
|
||
|
||
ProcScope instance = new ProcScope(this.name, this.topScope, this.is_constructor);
|
||
instance.is_extension = this.is_extension;
|
||
instance.original_function = this;
|
||
instance.loc = this.loc;
|
||
instance.body_loc = this.body_loc;
|
||
instance.parameters = new List<ElementScope>(this.parameters.Count);
|
||
int i = 0;
|
||
foreach (ElementScope parameter in this.parameters)
|
||
{
|
||
i++;
|
||
if (parameter.sc is UnknownScope || (parameter.sc is TypeScope) && (parameter.sc as TypeScope).IsGenericParameter)
|
||
{
|
||
int ind = template_parameters.IndexOf((parameter.sc as TypeScope).Name);
|
||
ElementScope inst_param = null;
|
||
if (gen_args.Count > ind && ind != -1)
|
||
inst_param = new ElementScope(new SymInfo(parameter.si.name, parameter.si.kind, parameter.si.description), gen_args[ind], parameter.topScope);
|
||
else
|
||
inst_param = new ElementScope(new SymInfo(parameter.si.name, parameter.si.kind, parameter.si.description), parameter.sc, parameter.topScope);
|
||
instance.parameters.Add(inst_param);
|
||
}
|
||
else
|
||
{
|
||
ElementScope inst_param = null;
|
||
if ((parameter.sc as TypeScope).IsGeneric)
|
||
inst_param = new ElementScope(new SymInfo(parameter.si.name, parameter.si.kind, parameter.si.description), (parameter.sc as TypeScope).GetInstance(gen_args), parameter.topScope);
|
||
else if (parameter.param_kind == parametr_kind.params_parametr && (parameter.sc as TypeScope).IsArray && (parameter.sc as TypeScope).GetElementType().IsGenericParameter && i - 1 < gen_args.Count && gen_args[i - 1].IsArray)
|
||
{
|
||
gen_args[i - 1] = gen_args[i - 1].GetElementType();
|
||
inst_param = new ElementScope(new SymInfo(parameter.si.name, parameter.si.kind, parameter.si.description), (parameter.sc as TypeScope).GetInstance(gen_args), parameter.topScope);
|
||
}
|
||
else if ((parameter.sc as TypeScope).GetElementType() != null && (parameter.sc as TypeScope).GetElementType().IsGenericParameter)
|
||
inst_param = new ElementScope(new SymInfo(parameter.si.name, parameter.si.kind, parameter.si.description), (parameter.sc as TypeScope).GetInstance(gen_args), parameter.topScope);
|
||
else
|
||
inst_param = new ElementScope(new SymInfo(parameter.si.name, parameter.si.kind, parameter.si.description), parameter.sc, parameter.topScope);
|
||
instance.parameters.Add(inst_param);
|
||
}
|
||
if (parameter.param_kind == parametr_kind.params_parametr && i < gen_args.Count)
|
||
gen_args.RemoveRange(i, gen_args.Count - i);
|
||
}
|
||
instance.si = this.si;
|
||
if (this.return_type != null)
|
||
{
|
||
bool exact = true;
|
||
if (template_parameters != null && template_parameters.Count > 0)
|
||
{
|
||
foreach (ElementScope parameter in this.parameters)
|
||
{
|
||
TypeScope ts = parameter.sc as TypeScope;
|
||
if (ts.IsGeneric && !ts.IsGenericParameter)
|
||
{
|
||
foreach (TypeScope inst_ts in ts.instances)
|
||
{
|
||
if (this.template_parameters != null && this.template_parameters.Contains(inst_ts.name))
|
||
{
|
||
exact = false;
|
||
if (ts.IsDelegate)
|
||
{
|
||
for (int j = 0; j < gen_args.Count; j++)
|
||
{
|
||
TypeScope gen_ts = gen_args[j];
|
||
if (gen_ts is ProcType)
|
||
{
|
||
gen_args[j] = (gen_ts as ProcType).InvokeMethod.return_type;
|
||
}
|
||
}
|
||
}
|
||
/*for (int j = 0; j < gen_args.Count; j++)
|
||
{
|
||
TypeScope gen_ts = gen_args[j];
|
||
if (gen_ts.IsGeneric && gen_ts.original_type != null)
|
||
{
|
||
int ind = gen_ts.original_type.generic_params.IndexOf(inst_ts.name);
|
||
if (ind != -1)
|
||
{
|
||
gen_args[j] = gen_ts.instances[ind];
|
||
}
|
||
}
|
||
}*/
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
else if (ts.GetElementType() != null && ts.GetElementType().IsGeneric)
|
||
{
|
||
foreach (TypeScope inst_ts in ts.GetElementType().instances)
|
||
{
|
||
if (this.template_parameters.Contains(inst_ts.name))
|
||
{
|
||
exact = false;
|
||
if (ts.IsDelegate)
|
||
{
|
||
for (int j = 0; j < gen_args.Count; j++)
|
||
{
|
||
TypeScope gen_ts = gen_args[j];
|
||
if (gen_ts is ProcType)
|
||
{
|
||
gen_args[j] = (gen_ts as ProcType).InvokeMethod.return_type;
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
/*else if (ts.GetElementType() != null && ts.GetElementType().IsGenericParameter)
|
||
{
|
||
if (this.template_parameters.Contains(ts.GetElementType().name))
|
||
{
|
||
exact = false;
|
||
}
|
||
}*/
|
||
}
|
||
}
|
||
instance.return_type = this.return_type.GetInstance(gen_args, exact);
|
||
}
|
||
|
||
return instance;
|
||
}
|
||
|
||
public virtual int GetParametersCount()
|
||
{
|
||
if (parameters == null) return 0;
|
||
return parameters.Count;
|
||
}
|
||
|
||
public virtual bool IsConstructor()
|
||
{
|
||
return is_constructor;
|
||
}
|
||
|
||
// не используется нигде для ProcScope EVA
|
||
public override void MakeSynonimDescription()
|
||
{
|
||
//aliased = true;
|
||
si.description = CodeCompletionController.CurrentParser?.LanguageInformation.GetSynonimDescription(this);
|
||
}
|
||
|
||
//zavershenie opisanija, vyzyvaetsja kogda parametry razobrany
|
||
public void Complete()
|
||
{
|
||
if (documentation != null && documentation.Length > 0 && documentation[0] == '-') return;
|
||
this.si.description = this.ToString();
|
||
this.si.addit_name = CodeCompletionController.CurrentParser?.LanguageInformation.GetShortName(this);
|
||
if (documentation != null) this.si.description += "\n" + this.documentation;
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
if (documentation != null && documentation.Length > 0 && documentation[0] == '-') return;
|
||
si.description = ToString();
|
||
si.addit_name = CodeCompletionController.CurrentParser.LanguageInformation.GetShortName(this);
|
||
}
|
||
|
||
public void AddTemplateParameter(string name)
|
||
{
|
||
if (template_parameters == null) template_parameters = new List<string>();
|
||
template_parameters.Add(name);
|
||
}
|
||
|
||
public override void AddName(string name, SymScope sc)
|
||
{
|
||
//ht[name] = sc;
|
||
sc.si.name = name;
|
||
members.Add(sc);
|
||
}
|
||
|
||
public virtual void AddParameter(ElementScope par)
|
||
{
|
||
parameters.Add(par);
|
||
}
|
||
|
||
public bool IsGeneric()
|
||
{
|
||
return template_parameters != null && template_parameters.Count > 0;
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
//SymScope sc = ht[name] as SymScope;
|
||
SymScope sc = internal_find(name, true);
|
||
if (sc != null) return sc;
|
||
if (topScope != null) sc = topScope.FindName(name);
|
||
if (sc != null) return sc;
|
||
if (procRealization != null && procRealization.top_mod_scope != null)
|
||
return procRealization.top_mod_scope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = internal_find_overloads(name, true);
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
if (procRealization != null && procRealization.top_mod_scope != null)
|
||
names.AddRange(procRealization.top_mod_scope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
/*foreach (string s in ht.Keys)
|
||
{
|
||
SymScope sc = ht[s] as SymScope;
|
||
lst.Add(sc.si);
|
||
}*/
|
||
foreach (SymScope ss in members)
|
||
if (ss != this && !IsHiddenName(ss.si.name))
|
||
{
|
||
if (ss.loc != null && loc != null)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0)
|
||
{
|
||
if (IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
else lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
lst.AddRange(this.topScope.GetNames());
|
||
//if (proc_realization != null) lst.AddRange(proc_realization.top_mod_scope.GetNames());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in members)
|
||
if (ss != this && !IsHiddenName(ss.si.name))
|
||
{
|
||
if (ss.loc != null && loc != null)
|
||
{
|
||
if (string.Compare(ss.loc.doc.file_name, loc.doc.file_name, true) == 0)
|
||
{
|
||
if (IsAfterDefinition(ss.loc.begin_line_num, ss.loc.begin_column_num))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
else lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
if (topScope != null)
|
||
lst.AddRange(topScope.GetNamesInAllTopScopes(all_names, ev, this.is_static));
|
||
if (procRealization != null)
|
||
lst.AddRange(procRealization.GetNamesInAllTopScopes(all_names, ev, this.is_static));
|
||
//if (proc_realization != null && proc_realization.top_mod_scope != null) lst.AddRange(proc_realization.top_mod_scope.GetNamesInAllTopScopes(all_names,ev,is_static));
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public virtual bool IsParamsEquals(ProcScope ps)
|
||
{
|
||
try
|
||
{
|
||
if (ps is CompiledMethodScope)
|
||
{
|
||
return (ps as CompiledMethodScope).IsParamsEquals(this);
|
||
}
|
||
else if (ps is CompiledConstructorScope)
|
||
{
|
||
return (ps as CompiledConstructorScope).IsParamsEquals(this);
|
||
}
|
||
else
|
||
{
|
||
if (this.parameters == null || this.parameters.Count == 0)
|
||
if (ps.parameters == null || ps.parameters.Count == 0)
|
||
{
|
||
if (this.return_type == null)
|
||
{
|
||
if (ps.return_type == null)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
else
|
||
return this.return_type.IsEqual(ps.return_type);
|
||
}
|
||
else
|
||
return false;
|
||
if (this.parameters.Count != ps.parameters.Count)
|
||
return false;
|
||
for (int i = 0; i < this.parameters.Count; i++)
|
||
{
|
||
if (this.parameters[i].param_kind != ps.parameters[i].param_kind)
|
||
return false;
|
||
if (!this.parameters[i].sc.IsEqual(ps.parameters[i].sc))
|
||
if (this.parameters[i].sc is UnknownScope)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
if (this.return_type == null)
|
||
if (ps.return_type != null)
|
||
return false;
|
||
else
|
||
return true;
|
||
return this.return_type.IsEqual(ps.return_type);
|
||
}
|
||
}
|
||
catch
|
||
{
|
||
return false;
|
||
}
|
||
}
|
||
|
||
private bool equal_parameters_and_result(ProcScope ps)
|
||
{
|
||
if (this.parameters == null)
|
||
{
|
||
if (ps.parameters != null)
|
||
return false;
|
||
else
|
||
if (this.return_type == null)
|
||
{
|
||
if (ps.return_type == null)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
return this.return_type.IsEqual(ps.return_type);
|
||
}
|
||
else
|
||
if (ps.parameters == null)
|
||
return false;
|
||
if (ps.parameters.Count != this.parameters.Count)
|
||
return false;
|
||
for (int i = 0; i < this.parameters.Count; i++)
|
||
{
|
||
if (!this.parameters[i].sc.IsEqual(ps.parameters[i].sc))
|
||
return false;
|
||
if (this.parameters[i].param_kind != ps.parameters[i].param_kind)
|
||
return false;
|
||
}
|
||
|
||
if (this.return_type == null)
|
||
{
|
||
if (ps.return_type == null)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
return this.return_type.IsEqual(ps.return_type);
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
ProcScope ps = ts as ProcScope;
|
||
if (ps == null) return false;
|
||
if (ps is ProcRealization) ps = (ps as ProcRealization).def_proc;
|
||
if (this == ps) return true;
|
||
if (ps.nextProc != null) return IsEqual(ps.nextProc);
|
||
if (this.nextProc != null) return this.nextProc.IsEqual(ts);
|
||
return false;
|
||
}
|
||
|
||
private string simp_descr;
|
||
|
||
public override string GetDescriptionWithoutDoc()
|
||
{
|
||
if (simp_descr == null) ToString();
|
||
return simp_descr;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
simp_descr = CodeCompletionController.CurrentParser?.LanguageInformation.GetSimpleDescription(this);
|
||
return CodeCompletionController.CurrentParser?.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
//perechislenie
|
||
public class EnumScope : TypeScope, IEnumScope
|
||
{
|
||
private List<string> enum_consts = new List<string>();//konstanty perechislenija
|
||
|
||
public EnumScope(SymbolKind kind, SymScope topScope, SymScope baseScope)
|
||
: base(kind, topScope, baseScope)
|
||
{
|
||
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Enum;
|
||
}
|
||
}
|
||
|
||
public string[] EnumConsts
|
||
{
|
||
get
|
||
{
|
||
return enum_consts.ToArray();
|
||
}
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return this;
|
||
}
|
||
|
||
public void AddEnumConstant(string name)
|
||
{
|
||
enum_consts.Add(name);
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (IsEqual(ts))
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
EnumScope es = ts as EnumScope;
|
||
if (es == null) return false;
|
||
if (enum_consts.Count != es.enum_consts.Count) return false;
|
||
for (int i = 0; i < es.enum_consts.Count; i++)
|
||
if (string.Compare(enum_consts[i], this.enum_consts[i], true) != 0) return false;
|
||
return true;
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return base.GetNames(ev, keyword, true);
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
//mnozhestvo
|
||
public class SetScope : TypeScope, ISetScope
|
||
{
|
||
|
||
public SetScope(TypeScope elementType)
|
||
{
|
||
this.elementType = elementType;
|
||
this.si = new SymInfo(this.ToString(), SymbolKind.Type, this.ToString());
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Set;
|
||
}
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return this;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// //SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
// return new SymInfo[0];
|
||
// }
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = new List<SymScope>();
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (IsEqual(ts) || ts is TemplateParameterScope || ts.IsGenericParameter)
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is SetScope)
|
||
return elementType.IsEqual((ts as SetScope).elementType);
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
//file [of type]
|
||
public class FileScope : TypeScope, IFileScope
|
||
{
|
||
|
||
public FileScope(TypeScope elementType, SymScope topScope)
|
||
{
|
||
this.topScope = topScope;
|
||
if (topScope != null)
|
||
{
|
||
if (elementType != null)
|
||
this.baseScope = topScope.FindName("TypedFile") as TypeScope;
|
||
else
|
||
this.baseScope = topScope.FindName("BinaryFile") as TypeScope;
|
||
}
|
||
this.elementType = elementType;
|
||
this.si = new SymInfo(this.ToString(), SymbolKind.Type, this.ToString());
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.File;
|
||
}
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
if (this.baseScope != null)
|
||
return this.baseScope.GetNames();
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
if (this.baseScope != null)
|
||
return this.baseScope.GetNames(ev, keyword, called_in_base);
|
||
return null;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
if (this.baseScope != null)
|
||
return this.baseScope.GetNamesAsInObject();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
if (this.baseScope != null)
|
||
return this.baseScope.GetNamesAsInObject(ev);
|
||
return new SymInfo[0];
|
||
}
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (this.baseScope != null)
|
||
return this.baseScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
if (this.baseScope != null)
|
||
return this.baseScope.FindNameOnlyInType(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
if (this.baseScope != null)
|
||
return this.baseScope.FindNameOnlyInThisType(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
if (this.baseScope != null)
|
||
return this.baseScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return new FileScope(gen_args[0], this.topScope);
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (ts is FileScope)
|
||
{
|
||
if ((ts as FileScope).elementType == null && elementType == null)
|
||
return true;
|
||
if ((ts as FileScope).elementType != null && elementType != null)
|
||
return elementType.IsEqual((ts as FileScope).elementType);
|
||
return false;
|
||
}
|
||
else if (ts is TypeSynonim)
|
||
return this.IsConvertable((ts as TypeSynonim).actType);
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is FileScope)
|
||
{
|
||
if ((ts as FileScope).elementType == null && elementType == null) return true;
|
||
if ((ts as FileScope).elementType != null && elementType != null)
|
||
return elementType.IsEqual((ts as FileScope).elementType);
|
||
return false;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
if (this.baseScope != null)
|
||
return baseScope.FindOverloadNames(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
if (this.baseScope != null)
|
||
return baseScope.FindOverloadNamesOnlyInType(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInBaseClass(ExpressionVisitor ev, bool is_static)
|
||
{
|
||
if (this.baseScope != null)
|
||
return baseScope.GetNamesAsInBaseClass(ev, is_static);
|
||
return null;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
public class TemplateParameterScope : TypeScope, ITemplateParameterScope
|
||
{
|
||
private SymScope declScope;
|
||
|
||
public TemplateParameterScope(string name, TypeScope baseType, SymScope declScope)
|
||
: base(SymbolKind.Type, null, baseType)
|
||
{
|
||
this.declScope = declScope;
|
||
this.topScope = declScope;
|
||
this.name = name;
|
||
BuildDescription();
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
if (gen_args.Count > 0)
|
||
return gen_args[0];
|
||
return this;
|
||
}
|
||
|
||
public override bool IsGenericParameter
|
||
{
|
||
get
|
||
{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
si.description = name + " in " + declScope.si.name;
|
||
}
|
||
}
|
||
|
||
//sinonim type myreal = real;
|
||
public class TypeSynonim : TypeScope, ITypeSynonimScope
|
||
{
|
||
public TypeScope actType;
|
||
|
||
public TypeSynonim(SymInfo si, SymScope actType, List<string> generic_params)
|
||
: base(SymbolKind.Type, null, null)
|
||
{
|
||
this.actType = actType as TypeScope;
|
||
this.si = si;
|
||
this.generic_params = generic_params;
|
||
if (actType.si != null && actType.si.description != null)
|
||
BuildDescription();
|
||
//this.si.describe = "type "+this.si.name + " = "+actType.si.name;
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.TypeSynonim;
|
||
}
|
||
}
|
||
|
||
public ITypeScope ActType
|
||
{
|
||
get
|
||
{
|
||
return actType;
|
||
}
|
||
}
|
||
|
||
public TypeScope GetLeafActType(int level=0)
|
||
{
|
||
if (actType is TypeSynonim && level < 10)
|
||
return (actType as TypeSynonim).GetLeafActType(level+1);
|
||
return actType;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return actType.GetNames();
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return actType.GetNames(ev, keyword, called_in_base);
|
||
}
|
||
|
||
public override TypeScope GetElementType()
|
||
{
|
||
return actType.GetElementType();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInBaseClass(ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return actType.GetNamesAsInBaseClass(ev, is_static);
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
SymScope ss = actType.FindName(name);
|
||
if (ss != null) return ss;
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
SymScope ss = actType.FindNameInAnyOrder(name);
|
||
if (ss != null) return ss;
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return actType.FindNameOnlyInThisType(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
return actType.GetNamesAsInObject();
|
||
}
|
||
|
||
public override TypeScope[] GetIndexers()
|
||
{
|
||
return actType.GetIndexers();
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
TypeScope original_type = actType;
|
||
if (actType.original_type != null)
|
||
original_type = actType.original_type;
|
||
TypeScope ts = original_type.GetInstance(gen_args, exact);
|
||
ts.aliased = true;
|
||
return ts;
|
||
}
|
||
|
||
public override ITypeScope ElementType
|
||
{
|
||
get
|
||
{
|
||
return actType.ElementType;
|
||
}
|
||
}
|
||
|
||
public override bool IsDelegate
|
||
{
|
||
get
|
||
{
|
||
return actType.IsDelegate;
|
||
}
|
||
}
|
||
|
||
public override void AddIndexer(TypeScope ts, bool is_static)
|
||
{
|
||
actType.AddIndexer(ts, is_static);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return actType.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return actType.GetConstructor();
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return actType.GetConstructors(search_in_base);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
return actType.GetNamesAsInObject(ev);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return actType.GetNamesInAllTopScopes(all_names, ev, is_static);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = actType.FindOverloadNames(name);
|
||
if (names.Count > 0)
|
||
return names;
|
||
if (topScope != null) return topScope.FindOverloadNames(name);
|
||
return names;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return actType.FindOverloadNamesOnlyInType(name);
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (ts is TypeSynonim)
|
||
ts = (ts as TypeSynonim).actType;
|
||
if (ts is TypeScope)
|
||
return this.actType.IsConvertable(ts, strong);
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is TypeSynonim) return string.Compare(this.si.name, ts.si.name, true) == 0;
|
||
if (ts is TypeScope)
|
||
return this.actType.IsEqual(ts as TypeScope);
|
||
return false;
|
||
//if (ts is TypeSynonim) return actType.IsEqual((ts as TypeSynonim).actType);
|
||
//return actType.IsEqual(ts);
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return si.name;
|
||
}
|
||
}
|
||
|
||
public class ShortStringScope : TypeScope, IShortStringScope
|
||
{
|
||
private CompiledScope actType;
|
||
private object len;
|
||
|
||
public ShortStringScope(CompiledScope actType, object len)
|
||
{
|
||
this.actType = actType;
|
||
this.len = len;
|
||
if (len != null)
|
||
{
|
||
this.si = new SymInfo("string", SymbolKind.Type, "string");
|
||
BuildDescription();
|
||
}
|
||
else this.si = actType.si;
|
||
}
|
||
|
||
public object Length
|
||
{
|
||
get
|
||
{
|
||
return len;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.ShortString;
|
||
}
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return actType.GetNames();
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return actType.GetNames(ev, keyword, called_in_base);
|
||
}
|
||
|
||
public override ITypeScope[] Indexers
|
||
{
|
||
get { return actType.Indexers; }
|
||
}
|
||
|
||
public override ITypeScope ElementType
|
||
{
|
||
get { return actType.ElementType; }
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return this;
|
||
}
|
||
|
||
public override TypeScope GetElementType()
|
||
{
|
||
return actType.GetElementType();
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
return actType.FindOverloadNames(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return actType.FindOverloadNamesOnlyInType(name);
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
SymScope ss = actType.FindName(name);
|
||
if (ss != null) return ss;
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return actType.FindNameOnlyInThisType(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
return actType.GetNamesAsInObject();
|
||
}
|
||
|
||
public override TypeScope[] GetIndexers()
|
||
{
|
||
return actType.GetIndexers();
|
||
}
|
||
|
||
public override void AddIndexer(TypeScope ts, bool is_static)
|
||
{
|
||
actType.AddIndexer(ts, is_static);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return actType.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return actType.GetConstructor();
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return actType.GetConstructors(search_in_base);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
return actType.GetNamesAsInObject(ev);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return actType.GetNamesInAllTopScopes(all_names, ev, is_static);
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is TypeSynonim) return actType.IsEqual((ts as TypeSynonim).actType);
|
||
if (ts is ShortStringScope) return this.len == (ts as ShortStringScope).len;
|
||
return false;
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (ts is TypeSynonim) return actType.IsConvertable((ts as TypeSynonim).actType, strong);
|
||
if (ts is ShortStringScope) return true;
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return si.name;
|
||
}
|
||
}
|
||
|
||
//massiv (dinamicheskij i staticheskij)
|
||
public class ArrayScope : TypeScope, IArrayScope
|
||
{
|
||
public TypeScope[] indexes;
|
||
private bool _is_dynamic_arr = false;
|
||
private bool _is_multi_dyn_arr = false;
|
||
internal TypeScope ilist;
|
||
|
||
public ArrayScope()
|
||
{
|
||
_is_dynamic_arr = true;
|
||
this.si = new SymInfo("$" + this.ToString(), SymbolKind.Type, this.ToString());
|
||
}
|
||
|
||
public ArrayScope(TypeScope elementType, TypeScope[] indexes)
|
||
{
|
||
this.elementType = elementType;
|
||
this.indexes = indexes;
|
||
if (indexes == null)
|
||
_is_dynamic_arr = true;
|
||
else
|
||
{
|
||
_is_multi_dyn_arr = true;
|
||
foreach (TypeScope ind_ts in indexes)
|
||
{
|
||
if (ind_ts != null)
|
||
{
|
||
_is_multi_dyn_arr = false;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
Type tarr = typeof(Array);
|
||
this.baseScope = TypeTable.get_compiled_type(new SymInfo(tarr.Name, SymbolKind.Type, tarr.FullName), tarr);
|
||
//if (is_dynamic_arr || _is_multi_dyn_arr)
|
||
{
|
||
List<TypeScope> lst = new List<TypeScope>();
|
||
lst.Add(elementType);
|
||
this.implemented_interfaces = new List<TypeScope>();
|
||
this.implemented_interfaces.Add(CompiledScope.get_type_instance(typeof(IEnumerable<>), lst));
|
||
ilist = CompiledScope.get_type_instance(typeof(IList<>), lst);
|
||
//this.implemented_interfaces.Add(CompiledScope.get_type_instance(typeof(IList<>), lst));
|
||
}
|
||
this.si = new SymInfo("$" + this.ToString(), SymbolKind.Type, this.ToString());
|
||
this.members = new List<SymScope>();
|
||
}
|
||
|
||
public override int Rank
|
||
{
|
||
get
|
||
{
|
||
if (indexes == null)
|
||
return 1;
|
||
return indexes.Length;
|
||
}
|
||
}
|
||
public bool IsMultiDynArray
|
||
{
|
||
get
|
||
{
|
||
return _is_multi_dyn_arr;
|
||
}
|
||
}
|
||
|
||
public bool is_multi_dyn_arr
|
||
{
|
||
get
|
||
{
|
||
return _is_multi_dyn_arr;
|
||
}
|
||
}
|
||
|
||
public bool is_dynamic_arr
|
||
{
|
||
get
|
||
{
|
||
return _is_dynamic_arr;
|
||
}
|
||
set
|
||
{
|
||
_is_dynamic_arr = value;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Array;
|
||
}
|
||
}
|
||
|
||
public override ITypeScope[] Indexers
|
||
{
|
||
get
|
||
{
|
||
return indexes;
|
||
}
|
||
}
|
||
|
||
public bool IsDynamic
|
||
{
|
||
get
|
||
{
|
||
return is_dynamic_arr;
|
||
}
|
||
}
|
||
|
||
public override bool IsArray
|
||
{
|
||
get
|
||
{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
public override TypeScope[] GetIndexers()
|
||
{
|
||
return indexes;
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
|
||
if ((elementType is UnknownScope || elementType is TemplateParameterScope) && gen_args.Count > 0)
|
||
{
|
||
InstanceCreationContext info = new InstanceCreationContext(this, gen_args, exact);
|
||
|
||
if (instance_cache.TryGetValue(info, out var instance))
|
||
{
|
||
return instance;
|
||
}
|
||
|
||
var arrayScope = new ArrayScope(gen_args[gen_args.Count - 1], Rank > 1 ? indexes : null);
|
||
|
||
instance_cache[info] = arrayScope;
|
||
|
||
return arrayScope;
|
||
}
|
||
|
||
return this;
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
if (is_dynamic_arr || IsMultiDynArray)
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
syms.AddRange(base.GetNames(ev, keyword, called_in_base));
|
||
if (!IsMultiDynArray && implemented_interfaces != null)
|
||
{
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
syms.AddRange(ts.GetNamesAsInObject(ev));
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
return new SymInfo[0];
|
||
//return new SymInfo[0];
|
||
//return base.GetNames(ev, keyword, called_in_base);
|
||
}
|
||
|
||
//u staticheskogo massiva prinimaem, chto net metodov i sv-v, u dinam. est
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
if (is_dynamic_arr || IsMultiDynArray)
|
||
return base.GetNamesAsInObject();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
if (is_dynamic_arr || IsMultiDynArray)
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
syms.AddRange(base.GetNamesAsInObject(ev));
|
||
if (!IsMultiDynArray && implemented_interfaces != null)
|
||
{
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
syms.AddRange(ts.GetNamesAsInObject(ev));
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
if (!is_dynamic_arr && !IsMultiDynArray)
|
||
return new List<SymScope>();
|
||
List<SymScope> syms = base.FindOverloadNamesOnlyInType(name);
|
||
/*if (implemented_interfaces != null)
|
||
{
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
syms.AddRange(ts.FindOverloadNamesOnlyInType(name));
|
||
}*/
|
||
return syms;
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (string.Compare(si.name, name, true) == 0)
|
||
return this;
|
||
if (!is_dynamic_arr && !IsMultiDynArray)
|
||
return null;
|
||
SymScope sc = null;
|
||
if (baseScope != null && is_dynamic_arr) sc = baseScope.FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = new List<SymScope>();
|
||
if (!is_dynamic_arr && !IsMultiDynArray)
|
||
return names;
|
||
if (baseScope != null && is_dynamic_arr) names.AddRange(baseScope.FindOverloadNamesOnlyInType(name));
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
if (!is_dynamic_arr && !IsMultiDynArray)
|
||
return null;
|
||
SymScope sc = null;
|
||
if (baseScope != null && is_dynamic_arr) sc = baseScope.FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
if (is_dynamic_arr || IsMultiDynArray)
|
||
return base.FindNameOnlyInType(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
if (is_dynamic_arr || IsMultiDynArray)
|
||
return base.FindNameOnlyInThisType(name);
|
||
return null;
|
||
}
|
||
|
||
public override void AddIndexer(TypeScope ts, bool is_static)
|
||
{
|
||
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (ts is NullTypeScope && is_dynamic_arr)
|
||
return true;
|
||
if (ts is TemplateParameterScope || ts.IsGenericParameter)
|
||
return true;
|
||
if (ts is CompiledScope && (ts as CompiledScope).ctn == PascalABCCompiler.NetHelper.NetHelper.ArrayType)
|
||
return true;
|
||
if (!is_dynamic_arr && !IsMultiDynArray)
|
||
return base.IsConvertable(ts);
|
||
ArrayScope arrs = ts as ArrayScope;
|
||
if (ts is CompiledScope && (ts as CompiledScope).IsArray)
|
||
{
|
||
return this.elementType.IsEqual(ts.GetElementType());
|
||
}
|
||
if (arrs == null || !arrs.is_dynamic_arr && !arrs.IsMultiDynArray)
|
||
if (ts is TypeSynonim) return this.IsConvertable((ts as TypeSynonim).actType);
|
||
else return false;
|
||
if (arrs.elementType == null || arrs.elementType is TemplateParameterScope)
|
||
return true;
|
||
if (!this.elementType.IsEqual(arrs.elementType)) return false;
|
||
if (this.IsMultiDynArray && arrs.IsMultiDynArray)
|
||
{
|
||
return this.indexes.Length == arrs.indexes.Length;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (!is_dynamic_arr && !is_multi_dyn_arr) return base.IsEqual(ts);
|
||
if (ts is NullTypeScope && is_dynamic_arr)
|
||
return true;
|
||
ArrayScope arrs = ts as ArrayScope;
|
||
if (ts is CompiledScope && (ts as CompiledScope).IsArray)
|
||
{
|
||
return this.elementType.IsEqual(ts.GetElementType());
|
||
}
|
||
if (arrs == null || !arrs.is_dynamic_arr && !arrs.is_multi_dyn_arr)
|
||
if (ts is TypeSynonim)
|
||
return this.IsEqual((ts as TypeSynonim).actType);
|
||
else
|
||
return false;
|
||
if (arrs.elementType == null || arrs.elementType is TemplateParameterScope)
|
||
return true;
|
||
if (!this.elementType.IsEqual(arrs.elementType))
|
||
return false;
|
||
if (is_multi_dyn_arr && !arrs.is_multi_dyn_arr)
|
||
return false;
|
||
if (!is_multi_dyn_arr && arrs.is_multi_dyn_arr)
|
||
return false;
|
||
if (is_multi_dyn_arr && arrs.is_multi_dyn_arr)
|
||
return this.indexes.Length == arrs.indexes.Length;
|
||
return true;
|
||
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
|
||
public override TypeScope GetElementType()
|
||
{
|
||
return elementType;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser?.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
//diapason
|
||
public class DiapasonScope : TypeScope, IDiapasonScope
|
||
{
|
||
public object left;
|
||
public object right;
|
||
|
||
public DiapasonScope(object left, object right)
|
||
{
|
||
this.left = left;
|
||
this.right = right;
|
||
this.si = new SymInfo(this.ToString(), SymbolKind.Type, this.ToString());
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Diapason;
|
||
}
|
||
}
|
||
|
||
public object Left
|
||
{
|
||
get
|
||
{
|
||
return left;
|
||
}
|
||
}
|
||
|
||
public object Right
|
||
{
|
||
get
|
||
{
|
||
return right;
|
||
}
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return this;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindOverloadNames(name);
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
//return left.ToString() + ".." + right.ToString();
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
//obsolete
|
||
public class RecordScope : TypeScope
|
||
{
|
||
public RecordScope()
|
||
{
|
||
//ht = new Hashtable();
|
||
baseScope = TypeTable.get_compiled_type(new SymInfo(typeof(ValueType).Name, SymbolKind.Struct, typeof(ValueType).FullName), typeof(ValueType));
|
||
si = new SymInfo("record", SymbolKind.Struct, "record");
|
||
this.members = new List<SymScope>();
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return "record";
|
||
}
|
||
|
||
}
|
||
|
||
public class NullTypeScope : TypeScope
|
||
{
|
||
public NullTypeScope()
|
||
{
|
||
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (ts is NullTypeScope)
|
||
return false;
|
||
return ts.IsConvertable(this);
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
}
|
||
|
||
//tip-ukazatel
|
||
public class PointerScope : TypeScope, IPointerScope
|
||
{
|
||
public TypeScope ref_type;
|
||
|
||
public PointerScope()
|
||
{
|
||
this.si = new SymInfo("", SymbolKind.Type, "");
|
||
}
|
||
|
||
public PointerScope(TypeScope ref_type)
|
||
{
|
||
this.ref_type = ref_type;
|
||
this.si = new SymInfo(this.ToString(), SymbolKind.Type, this.ToString());
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Pointer;
|
||
}
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
return this;
|
||
}
|
||
|
||
public override ITypeScope ElementType
|
||
{
|
||
get { return ref_type; }
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (IsEqual(ts))
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is NullTypeScope)
|
||
return true;
|
||
if (!(ts is PointerScope))
|
||
return false;
|
||
if (ts is PointerScope)
|
||
if ((ts as PointerScope).ref_type == null)
|
||
return true;
|
||
|
||
return ref_type == (ts as PointerScope).ref_type;
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return this.ToString();
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
return new List<ProcScope>(0);
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
internal struct InstanceCreationContext : IEquatable<InstanceCreationContext>
|
||
{
|
||
public TypeScope originalType;
|
||
public List<TypeScope> genericArguments;
|
||
public bool exact;
|
||
|
||
public InstanceCreationContext(TypeScope originalType, List<TypeScope> genericArguments, bool exact)
|
||
{
|
||
this.originalType = originalType;
|
||
this.genericArguments = genericArguments;
|
||
this.exact = exact;
|
||
}
|
||
|
||
private struct ScopeComparer : IEqualityComparer<TypeScope>
|
||
{
|
||
public bool Equals(TypeScope t1, TypeScope t2) => t1.IsEqual(t2);
|
||
|
||
public int GetHashCode(TypeScope t) => t.GetDescription().GetHashCode();
|
||
}
|
||
|
||
public bool Equals(InstanceCreationContext otherInfo)
|
||
{
|
||
|
||
return this.originalType.IsEqual(otherInfo.originalType) &&
|
||
this.genericArguments.SequenceEqual(otherInfo.genericArguments, new ScopeComparer()) &&
|
||
this.exact == otherInfo.exact;
|
||
}
|
||
|
||
public override int GetHashCode()
|
||
{
|
||
return string.Join("", genericArguments.Select(arg => arg.si != null ? arg.GetDescription() : "")
|
||
.Concat(new string[] { originalType.GetDescription(), exact.ToString() })).GetHashCode();
|
||
}
|
||
}
|
||
|
||
//opisanie tipa (klassa, zapisi) ot nego est nasledniki. sdelal ih dlja udobstva.
|
||
public class TypeScope : SymScope, ITypeScope
|
||
{
|
||
public SymbolKind kind;
|
||
public TypeScope baseScope;
|
||
public location real_body_loc;
|
||
public location predef_loc;
|
||
public string name;
|
||
//public List<SymScope> members;
|
||
public TypeScope elementType;
|
||
public TypeScope original_type;
|
||
private List<TypeScope> indexers;
|
||
private List<TypeScope> static_indexers;
|
||
public List<TypeScope> implemented_interfaces;
|
||
public List<TypeScope> instances;
|
||
public List<TypeScope> other_partials;
|
||
public List<string> generic_params;
|
||
public bool is_final;
|
||
public bool aliased = false;
|
||
internal bool lazy_instance = false;
|
||
internal static Dictionary<InstanceCreationContext, TypeScope> instance_cache = new Dictionary<InstanceCreationContext, TypeScope>();
|
||
|
||
public TypeScope() { }
|
||
public TypeScope(SymbolKind kind, SymScope topScope, SymScope baseScope)
|
||
{
|
||
this.kind = kind;
|
||
this.baseScope = baseScope as TypeScope;
|
||
this.topScope = topScope;
|
||
if (baseScope == null)
|
||
{
|
||
if (CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
switch (kind)
|
||
{
|
||
case SymbolKind.Struct: this.baseScope = TypeTable.get_compiled_type(new SymInfo(typeof(ValueType).Name, SymbolKind.Struct, typeof(ValueType).FullName), typeof(ValueType)); break;
|
||
case SymbolKind.Interface:
|
||
case SymbolKind.Class: this.baseScope = TypeTable.get_compiled_type(new SymInfo(typeof(object).Name, SymbolKind.Class, typeof(object).FullName), typeof(object)); break;
|
||
case SymbolKind.Enum: this.baseScope = TypeTable.get_compiled_type(new SymInfo(typeof(Enum).Name, SymbolKind.Enum, typeof(Enum).FullName), typeof(Enum)); break;
|
||
}
|
||
}
|
||
this.members = new List<SymScope>();
|
||
//this.indexers = new List<TypeScope>();
|
||
this.instances = new List<TypeScope>();
|
||
//this.static_indexers = new List<TypeScope>();
|
||
si = new SymInfo("type", kind, "type");
|
||
switch (kind)
|
||
{
|
||
case SymbolKind.Struct: si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetKeyword(PascalABCCompiler.Parsers.SymbolKind.Struct); break;
|
||
case SymbolKind.Class: si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetKeyword(PascalABCCompiler.Parsers.SymbolKind.Class); break;
|
||
case SymbolKind.Interface: si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetKeyword(PascalABCCompiler.Parsers.SymbolKind.Interface); break;
|
||
case SymbolKind.Enum: si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetKeyword(PascalABCCompiler.Parsers.SymbolKind.Enum); break;
|
||
}
|
||
|
||
}
|
||
|
||
public virtual bool IsStatic
|
||
{
|
||
get
|
||
{
|
||
return is_static;
|
||
}
|
||
}
|
||
|
||
public virtual int Rank
|
||
{
|
||
get
|
||
{
|
||
return 0;
|
||
}
|
||
}
|
||
|
||
public override void Clear()
|
||
{
|
||
base.Clear();
|
||
if (generic_params != null)
|
||
generic_params.Clear();
|
||
}
|
||
|
||
public bool HasPartial(TypeScope ts)
|
||
{
|
||
if (other_partials == null)
|
||
return false;
|
||
return other_partials.Contains(ts);
|
||
}
|
||
|
||
public void AddPartial(TypeScope ts)
|
||
{
|
||
if (other_partials == null)
|
||
other_partials = new List<TypeScope>();
|
||
if (!other_partials.Contains(ts))
|
||
other_partials.Add(ts);
|
||
}
|
||
|
||
public virtual List<TypeScope> GetInstances()
|
||
{
|
||
return this.instances;
|
||
}
|
||
|
||
public virtual TypeScope GenericTypeDefinition
|
||
{
|
||
get
|
||
{
|
||
return this;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsGenericParameter
|
||
{
|
||
get
|
||
{
|
||
return false;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Type;
|
||
}
|
||
}
|
||
|
||
public bool Aliased
|
||
{
|
||
get
|
||
{
|
||
return aliased;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsDelegate
|
||
{
|
||
get
|
||
{
|
||
return false;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsArray
|
||
{
|
||
get
|
||
{
|
||
return false;
|
||
}
|
||
}
|
||
|
||
public virtual ITypeScope[] Indexers
|
||
{
|
||
get
|
||
{
|
||
return this.GetIndexers();
|
||
}
|
||
}
|
||
|
||
public virtual ITypeScope[] StaticIndexers
|
||
{
|
||
get
|
||
{
|
||
return this.GetStaticIndexers();
|
||
}
|
||
}
|
||
|
||
public virtual bool IsFinal
|
||
{
|
||
get
|
||
{
|
||
return is_final;
|
||
}
|
||
}
|
||
|
||
public virtual bool IsAbstract
|
||
{
|
||
get
|
||
{
|
||
return is_abstract;
|
||
}
|
||
}
|
||
|
||
public virtual ITypeScope[] GenericInstances
|
||
{
|
||
get
|
||
{
|
||
return instances.ToArray();
|
||
}
|
||
}
|
||
|
||
public virtual string[] TemplateArguments
|
||
{
|
||
get
|
||
{
|
||
if (generic_params != null && generic_params.Count > 0)
|
||
{
|
||
return generic_params.ToArray();
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public IBaseScope BaseType
|
||
{
|
||
get
|
||
{
|
||
return baseScope;
|
||
}
|
||
}
|
||
|
||
public virtual ITypeScope ElementType
|
||
{
|
||
get
|
||
{
|
||
return elementType;
|
||
}
|
||
}
|
||
|
||
public virtual void AddGenericInstanciation(TypeScope ts)
|
||
{
|
||
instances.Add(ts);
|
||
}
|
||
|
||
public void AddDefaultConstructorIfNeed()
|
||
{
|
||
if (members != null && !is_static)
|
||
{
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
ProcScope ps = ss as ProcScope;
|
||
if (ps != null && ps.is_constructor && (ps.parameters == null || ps.parameters.Count == 0) && !ps.is_static)
|
||
{
|
||
return;
|
||
}
|
||
}
|
||
|
||
ProcScope other_constr = this.FindNameOnlyInType(StringConstants.default_constructor_name) as ProcScope;
|
||
ProcScope constr = new ProcScope(StringConstants.default_constructor_name, this, true);
|
||
if (other_constr != null && other_constr.declaringType == this)
|
||
constr.si.acc_mod = access_modifer.protected_modifer;
|
||
else
|
||
constr.si.acc_mod = access_modifer.public_modifer;
|
||
//constr.head_loc = this.loc;
|
||
//constr.loc = this.loc;
|
||
constr.is_constructor = true;
|
||
|
||
constr.Complete();
|
||
constr.nextProc = other_constr;
|
||
members.Insert(0, constr);
|
||
}
|
||
}
|
||
|
||
public override bool IsChildScopeOf(SymScope ss)
|
||
{
|
||
if (ss == null || !(ss is TypeScope))
|
||
return false;
|
||
TypeScope ts = this;
|
||
while (ts.baseScope != null)
|
||
if (ts.baseScope == ss)
|
||
return true;
|
||
else ts = ts.baseScope;
|
||
return false;
|
||
}
|
||
|
||
public virtual List<ProcScope> GetOverridableMethods()
|
||
{
|
||
List<ProcScope> procs = new List<ProcScope>();
|
||
if (members != null)
|
||
foreach (SymScope ss in members)
|
||
if (ss is ProcScope && ss.is_virtual)
|
||
procs.Add(ss.WithRefreshedDescription() as ProcScope);
|
||
if (baseScope != null)
|
||
procs.AddRange(baseScope.GetOverridableMethods());
|
||
return procs;
|
||
}
|
||
|
||
public virtual List<ProcScope> GetAbstractMethods()
|
||
{
|
||
List<ProcScope> procs = new List<ProcScope>();
|
||
if (members != null)
|
||
foreach (SymScope ss in members)
|
||
if (ss is ProcScope && (ss.is_abstract || this.si.kind == SymbolKind.Interface))
|
||
procs.Add(ss.WithRefreshedDescription() as ProcScope);
|
||
if (si.kind == SymbolKind.Interface && implemented_interfaces != null)
|
||
foreach (TypeScope t in implemented_interfaces)
|
||
procs.AddRange(t.GetAbstractMethods());
|
||
return procs;
|
||
}
|
||
|
||
public virtual List<ProcScope> GetMethods()
|
||
{
|
||
List<ProcScope> procs = new List<ProcScope>();
|
||
if (members != null)
|
||
foreach (SymScope ss in members)
|
||
if (ss is ProcScope)
|
||
procs.Add(ss as ProcScope);
|
||
return procs;
|
||
}
|
||
|
||
private TypeScope internalInstance(TypeScope ts, List<TypeScope> gen_args)
|
||
{
|
||
if (ts is TemplateParameterScope || ts is UnknownScope)
|
||
{
|
||
if (this.generic_params == null)
|
||
return ts;
|
||
int ind = this.generic_params.IndexOf(ts.Name);
|
||
if (ind != -1)
|
||
{
|
||
return gen_args[ind];
|
||
}
|
||
else
|
||
return ts;
|
||
}
|
||
else if (ts is ArrayScope)
|
||
{
|
||
ArrayScope arr = null;
|
||
if ((ts as ArrayScope).is_dynamic_arr)
|
||
{
|
||
arr = new ArrayScope(internalInstance(ts.elementType, gen_args), (ts as ArrayScope).indexes);
|
||
arr.is_dynamic_arr = true;
|
||
}
|
||
else
|
||
arr = new ArrayScope(internalInstance(ts.elementType, gen_args), (ts as ArrayScope).indexes);
|
||
return arr;
|
||
}
|
||
else if (ts is TypeScope && ts.instances != null && ts.instances.Count > 0)
|
||
{
|
||
return ts.simpleGetInstance(gen_args);
|
||
}
|
||
else
|
||
return ts;
|
||
}
|
||
|
||
public virtual bool IsGeneric
|
||
{
|
||
get
|
||
{
|
||
return generic_params != null && generic_params.Count > 0;
|
||
}
|
||
}
|
||
|
||
protected virtual TypeScope simpleGetInstance(List<TypeScope> gen_args)
|
||
{
|
||
TypeScope ts = new TypeScope(this.kind, this.topScope, this.baseScope);
|
||
ts.original_type = this;
|
||
ts.lazy_instance = true;
|
||
ts.other_partials = this.other_partials;
|
||
ts.loc = this.loc;
|
||
for (int i = 0; i < gen_args.Count; i++)
|
||
{
|
||
TypeScope gen_arg = gen_args[i];
|
||
if (gen_arg.instances != null && gen_arg.original_type != null)
|
||
{
|
||
if (gen_arg.original_type.generic_params != null && this.generic_params != null)
|
||
for (int j = 0; j < gen_arg.original_type.generic_params.Count; j++)
|
||
{
|
||
if (string.Compare(gen_arg.original_type.generic_params[j], this.generic_params[j], true) == 0)
|
||
{
|
||
ts.AddGenericInstanceParameter(gen_arg.instances[j].si.name);
|
||
ts.AddGenericInstanciation(gen_arg.instances[j]);
|
||
}
|
||
}
|
||
}
|
||
else
|
||
{
|
||
ts.AddGenericInstanceParameter(gen_args[i].si.name);
|
||
ts.AddGenericInstanciation(gen_args[i]);
|
||
}
|
||
|
||
}
|
||
ts.si.name = this.si.name;
|
||
ts.documentation = this.documentation;
|
||
ts.si.description = ts.GetDescription();
|
||
return ts;
|
||
}
|
||
|
||
public virtual TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
|
||
InstanceCreationContext info = new InstanceCreationContext(this, gen_args, exact);
|
||
|
||
if (instance_cache.TryGetValue(info, out var instance))
|
||
{
|
||
return instance;
|
||
}
|
||
|
||
TypeScope ts = new TypeScope(this.kind, this.topScope, this.baseScope);
|
||
|
||
ts.original_type = this;
|
||
ts.loc = this.loc;
|
||
ts.other_partials = this.other_partials;
|
||
List<TypeScope> new_gen_args = new List<TypeScope>();
|
||
for (int i = 0; i < gen_args.Count; i++)
|
||
{
|
||
TypeScope gen_arg = gen_args[i];
|
||
if (gen_arg.instances != null && gen_arg.original_type != null && !exact)
|
||
{
|
||
if (gen_arg.original_type.generic_params != null && this.generic_params != null)
|
||
for (int j = 0; j < gen_arg.original_type.generic_params.Count; j++)
|
||
{
|
||
if (string.Compare(gen_arg.original_type.generic_params[j], this.generic_params[j], true) == 0)
|
||
{
|
||
new_gen_args.Add(gen_arg.instances[j]);
|
||
ts.AddGenericInstanceParameter(gen_arg.instances[j].si.name);
|
||
ts.AddGenericInstanciation(gen_arg.instances[j]);
|
||
}
|
||
}
|
||
}
|
||
else
|
||
{
|
||
ts.AddGenericInstanceParameter(gen_args[i].si.name);
|
||
ts.AddGenericInstanciation(gen_args[i]);
|
||
new_gen_args.Add(gen_args[i]);
|
||
}
|
||
}
|
||
gen_args = new_gen_args;
|
||
ts.si.name = this.si.name;
|
||
ts.documentation = this.documentation;
|
||
ts.si.description = ts.GetDescription();
|
||
if (this.elementType != null)
|
||
{
|
||
ts.elementType = internalInstance(this.elementType, gen_args);
|
||
}
|
||
if (implemented_interfaces != null)
|
||
{
|
||
ts.implemented_interfaces = new List<TypeScope>();
|
||
for (int j = 0; j < this.implemented_interfaces.Count; j++)
|
||
ts.implemented_interfaces.Add(internalInstance(this.implemented_interfaces[j], gen_args));
|
||
}
|
||
if (this.indexers != null && this.indexers.Count > 0)
|
||
{
|
||
ts.indexers = new List<TypeScope>();
|
||
for (int j = 0; j < this.indexers.Count; j++)
|
||
ts.indexers.Add(internalInstance(this.indexers[j], gen_args));
|
||
}
|
||
Hashtable procs = new Hashtable();
|
||
for (int i = 0; i < members.Count; i++)
|
||
{
|
||
SymScope ss = members[i];
|
||
ts.members.Add(ss);
|
||
if (ss is ElementScope)
|
||
{
|
||
ElementScope es = ss as ElementScope;
|
||
ElementScope new_es = new ElementScope(new SymInfo(es.si.name, es.si.kind, es.si.name), es.sc, ts);
|
||
ts.members[ts.members.IndexOf(ss)] = new_es;
|
||
new_es.loc = es.loc;
|
||
new_es.documentation = es.documentation;
|
||
new_es.si.acc_mod = es.si.acc_mod;
|
||
new_es.si.has_doc = es.si.has_doc;
|
||
if (es.indexers != null && es.indexers.Count > 0)
|
||
{
|
||
new_es.indexers = new List<TypeScope>();
|
||
for (int j = 0; j < es.indexers.Count; j++)
|
||
new_es.indexers.Add(internalInstance(es.indexers[j], gen_args));
|
||
}
|
||
if (es.elementType != null)
|
||
{
|
||
new_es.elementType = internalInstance(es.elementType, gen_args);
|
||
}
|
||
new_es.sc = internalInstance(es.sc as TypeScope, gen_args);
|
||
new_es.MakeDescription();
|
||
}
|
||
else if (ss is ProcScope)
|
||
{
|
||
ProcScope ps = ss as ProcScope;
|
||
ProcScope new_proc = new ProcScope(ps.si.name, ts, ps.is_constructor);
|
||
procs[ps] = new_proc;
|
||
new_proc.loc = ps.loc;
|
||
new_proc.documentation = ps.documentation;
|
||
new_proc.si.acc_mod = ps.si.acc_mod;
|
||
new_proc.si.description = ps.si.description;
|
||
new_proc.is_static = ps.is_static;
|
||
new_proc.is_virtual = ps.is_virtual;
|
||
new_proc.is_abstract = ps.is_abstract;
|
||
new_proc.is_override = ps.is_override;
|
||
new_proc.is_reintroduce = ps.is_reintroduce;
|
||
ts.members[ts.members.IndexOf(ss)] = new_proc;
|
||
if (ps.parameters != null)
|
||
for (int j = 0; j < ps.parameters.Count; j++)
|
||
{
|
||
ElementScope es = ps.parameters[j];
|
||
ElementScope es2 = new ElementScope(new SymInfo(es.si.name, es.si.kind, es.si.name), es.sc, new_proc);
|
||
es2.loc = es.loc;
|
||
es2.cnst_val = es.cnst_val;
|
||
es2.si.acc_mod = es.si.acc_mod;
|
||
es2.param_kind = es.param_kind;
|
||
es2.sc = internalInstance(es.sc as TypeScope, gen_args);
|
||
es2.MakeDescription();
|
||
new_proc.AddParameter(es2);
|
||
}
|
||
new_proc.return_type = internalInstance(ps.return_type, gen_args);
|
||
new_proc.Complete();
|
||
}
|
||
}
|
||
foreach (ProcScope ps in procs.Keys)
|
||
{
|
||
ProcScope new_ps = procs[ps] as ProcScope;
|
||
if (ps.nextProc != null && procs[ps.nextProc] != null)
|
||
{
|
||
new_ps.nextProc = procs[ps.nextProc] as ProcScope;
|
||
}
|
||
}
|
||
|
||
instance_cache[info] = ts;
|
||
|
||
return ts;
|
||
}
|
||
|
||
public virtual void ClearInstances()
|
||
{
|
||
if (instances != null)
|
||
instances.Clear();
|
||
}
|
||
|
||
public virtual void AddGenericParameter(string name, location loc)
|
||
{
|
||
if (generic_params == null) generic_params = new List<string>();
|
||
generic_params.Add(name);
|
||
var ts = new TemplateParameterScope(name, TypeTable.obj_type, this);
|
||
ts.loc = loc;
|
||
AddName(name, ts);
|
||
}
|
||
|
||
public virtual void AddGenericInstanceParameter(string name)
|
||
{
|
||
if (generic_params == null) generic_params = new List<string>();
|
||
generic_params.Add(name);
|
||
}
|
||
|
||
public virtual void AddImplementedInterface(TypeScope type)
|
||
{
|
||
if (implemented_interfaces == null) implemented_interfaces = new List<TypeScope>();
|
||
implemented_interfaces.Add(type);
|
||
}
|
||
|
||
public override void MakeSynonimDescription()
|
||
{
|
||
aliased = true;
|
||
si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetSynonimDescription(this);
|
||
}
|
||
|
||
public virtual bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
if (IsEqual(ts))
|
||
return true;
|
||
if (this is UnknownScope && ts is CompiledScope && (ts as CompiledScope).CompiledType.IsGenericParameter
|
||
|| ts is UnknownScope && this is CompiledScope && (this as CompiledScope).CompiledType.IsGenericParameter)
|
||
return true;
|
||
if (this.IsGenericParameter && ts.IsGenericParameter && this.Name == ts.Name)
|
||
return true;
|
||
if (ts is TemplateParameterScope || ts.IsGenericParameter)
|
||
return true;
|
||
TypeScope tmp = this.baseScope;
|
||
while (tmp != null)
|
||
if (tmp.IsEqual(ts))
|
||
return true;
|
||
else
|
||
tmp = tmp.baseScope;
|
||
SymScope ss = this.FindNameOnlyInType("operator implicit");
|
||
if (ss is ProcScope && (ss as ProcScope).return_type == ts)
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
//dlja sravnivanija tipov
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
bool eq = this == ts as TypeScope;
|
||
if (ts == null)
|
||
return false;
|
||
if (ts is NullTypeScope && this.kind == SymbolKind.Class)
|
||
return true;
|
||
if (eq)
|
||
return true;
|
||
TypeScope typ = ts as TypeScope;
|
||
if ((typ is TemplateParameterScope || typ is UnknownScope) && this is TemplateParameterScope)
|
||
return string.Compare(this.si.name, typ.si.name, true) == 0;
|
||
if (this.original_type != null && typ.original_type != null)
|
||
{
|
||
if (this.original_type.IsEqual(typ.original_type) && this.instances.Count == typ.instances.Count)
|
||
{
|
||
for (int i = 0; i < this.instances.Count; i++)
|
||
{
|
||
if (!this.instances[i].IsEqual(typ.instances[i]))
|
||
return false;
|
||
if (typ.instances[i] is UnknownScope && this.instances[i] is TemplateParameterScope)
|
||
typ.instances[i] = this.instances[i];
|
||
}
|
||
return true;
|
||
}
|
||
else
|
||
return false;
|
||
}
|
||
else
|
||
return false;
|
||
}
|
||
|
||
public virtual bool IsTypeStrictEqual(TypeScope ts)
|
||
{
|
||
var eq = this.IsEqual(ts);
|
||
if (!eq)
|
||
return false;
|
||
if (this.instances != null && ts.instances == null)
|
||
return false;
|
||
if (this.instances == null && ts.instances != null)
|
||
return false;
|
||
if (this.instances.Count != ts.instances.Count)
|
||
return false;
|
||
for (int i = 0; i < this.instances.Count; i++)
|
||
{
|
||
if (!this.instances[i].IsTypeStrictEqual(ts.instances[i]))
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
public virtual ProcScope GetConstructor()
|
||
{
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
if (ss is ProcScope && (ss as ProcScope).IsConstructor()) return ss as ProcScope;
|
||
if (baseScope != null)
|
||
return baseScope.GetConstructor();
|
||
return null;
|
||
}
|
||
|
||
IProcScope ITypeScope.GetConstructor()
|
||
{
|
||
return this.GetConstructor();
|
||
}
|
||
|
||
public virtual List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
List<ProcScope> constrs = new List<ProcScope>();
|
||
bool must_inherite = true;
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
if (ss is ProcScope && (ss as ProcScope).IsConstructor() && !ss.is_static)
|
||
{
|
||
if (ss.loc != null)
|
||
must_inherite = false;
|
||
constrs.Add(ss as ProcScope);
|
||
}
|
||
if (baseScope != null && (must_inherite || search_in_base))
|
||
{
|
||
List<ProcScope> lst = baseScope.GetConstructors(true);
|
||
for (int i = 0; i < lst.Count; i++)
|
||
{
|
||
if (lst[i].parameters != null && lst[i].parameters.Count > 0)
|
||
constrs.Add(lst[i]);
|
||
}
|
||
}
|
||
return constrs;
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
si.description = CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
|
||
//opisanie, vysvechivaetsja v zheltkom okoshke
|
||
public override string GetDescription()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
|
||
//dubl?????
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
/*foreach (string s in ht.Keys)
|
||
{
|
||
SymScope sc = ht[s] as SymScope;
|
||
lst.Add(sc.si);
|
||
}*/
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
if (!IsHiddenName(ss.si.name))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
if (baseScope != null)
|
||
lst.AddRange(baseScope.GetNames());
|
||
/*if (topScope != null)
|
||
lst.AddRange(topScope.GetNames());*/
|
||
return lst.ToArray();
|
||
}
|
||
|
||
//eto
|
||
public override SymInfo[] GetNamesAsInBaseClass(ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
//if (ss is ProcScope && (ss as ProcScope).IsConstructor())
|
||
// continue;
|
||
if (!IsHiddenName(ss.si.name))
|
||
{
|
||
if (ss.si.acc_mod == access_modifer.private_modifer)
|
||
{
|
||
if (ev.CheckPrivateForBaseAccess(ev.entry_scope, this))
|
||
AddSymInfo();
|
||
}
|
||
else if (ss.si.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
if (ev.CheckForBaseAccess(ev.entry_scope, this))
|
||
AddSymInfo();
|
||
}
|
||
else
|
||
AddSymInfo();
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
|
||
void AddSymInfo()
|
||
{
|
||
if (!is_static) lst.Add(ss.WithRefreshedDescription().si);
|
||
else if (ss.is_static) lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
if (baseScope != null)
|
||
lst.AddRange(baseScope.GetNamesAsInBaseClass(ev, is_static));
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
//SortedDictionary<string,SymInfo> dict = new SortedDictionary<string,SymInfo>();
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
/*foreach (string s in ht.Keys)
|
||
{
|
||
SymScope sc = ht[s] as SymScope;
|
||
lst.Add(sc.si);
|
||
}*/
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
if (!IsHiddenName(ss.si.name) && !ss.is_static)
|
||
if (!(ss is ProcScope) && !(ss is TemplateParameterScope))
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
else if (!(ss as ProcScope).IsConstructor())
|
||
{
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
if (baseScope != null) lst.AddRange(baseScope.GetNamesAsInObject());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override TypeScope GetElementType()
|
||
{
|
||
if (elementType != null) return elementType;
|
||
TypeScope elem_ts = null;
|
||
if (baseScope != null)
|
||
{
|
||
elem_ts = baseScope.GetElementType();
|
||
if (elem_ts != null)
|
||
return elem_ts;
|
||
}
|
||
|
||
if (implemented_interfaces != null)
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
{
|
||
elem_ts = ts.GetElementType();
|
||
if (elem_ts != null)
|
||
return elem_ts;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
protected List<SymScope> GetMergedMembers()
|
||
{
|
||
if (other_partials == null)
|
||
return members;
|
||
List<SymScope> merged_members = new List<SymScope>();
|
||
merged_members.AddRange(members);
|
||
foreach (var ts in other_partials)
|
||
merged_members.AddRange(ts.members);
|
||
return merged_members;
|
||
}
|
||
|
||
//esli naprimer nazhali ctrl-probel(all_name = treu) ili shift-probel (all_names = false)
|
||
//visitor vsegda nuzhen tak kak hranit scope, gde my nazhali
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
if (ss is ProcScope && (ss as ProcScope).IsConstructor())
|
||
continue;
|
||
if (!IsHiddenName(ss.si.name))
|
||
{
|
||
if (ss.si.acc_mod == access_modifer.private_modifer)
|
||
{
|
||
if (ev.CheckPrivateForBaseAccess(ev.entry_scope, this))
|
||
AddSymInfo();
|
||
}
|
||
else if (ss.si.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
if (ev.CheckForBaseAccess(ev.entry_scope, this))
|
||
AddSymInfo();
|
||
}
|
||
else
|
||
AddSymInfo();
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
|
||
void AddSymInfo()
|
||
{
|
||
if (!is_static) lst.Add(ss.WithRefreshedDescription().si);
|
||
else if (ss.is_static) lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
if (baseScope != null)
|
||
lst.AddRange(baseScope.GetNamesAsInBaseClass(ev, is_static));
|
||
if (topScope != null)
|
||
lst.AddRange(topScope.GetNamesInAllTopScopes(all_names, ev, is_static));
|
||
|
||
return lst.ToArray();
|
||
}
|
||
|
||
//poluchit imena s klassa s kluchevym slovom
|
||
//vyzyvaetsja, kogda procedure TClass. tut vse ekzemplarnye i staticheskie
|
||
public virtual SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
if (!IsHiddenName(ss.si.name))
|
||
{
|
||
if (keyword != PascalABCCompiler.Parsers.KeywordKind.Function && keyword != PascalABCCompiler.Parsers.KeywordKind.Constructor && keyword != PascalABCCompiler.Parsers.KeywordKind.Destructor/*!(ev.entry_scope is InterfaceUnitScope) && !(ev.entry_scope is ImplementationUnitScope)*/)
|
||
{
|
||
if (ss.si.acc_mod == access_modifer.private_modifer)
|
||
{
|
||
if (ss.is_static && ev.CheckPrivateForBaseAccess(ev.entry_scope, this))
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else if (ss.si.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
if (ss.is_static && ev.CheckForBaseAccess(ev.entry_scope, this))
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else if (ss.is_static)
|
||
{
|
||
if (!((ss is ProcScope) && (ss as ProcScope).IsConstructor()))
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
|
||
else if ((ss is ProcScope) && (ss as ProcScope).IsConstructor())
|
||
if (!((ss as ProcScope).parameters == null || (ss as ProcScope).parameters.Count == 0) || !called_in_base)
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else
|
||
{
|
||
if (ss is ProcScope && !(ss as ProcScope).already_defined)
|
||
{
|
||
if (keyword == PascalABCCompiler.Parsers.KeywordKind.Function || keyword == PascalABCCompiler.Parsers.KeywordKind.Destructor)
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
else if ((ss as ProcScope).IsConstructor())
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
// SSM 10/07/24 добавил это чтобы не показывались статические члены базового класса
|
||
if (this.documentation != null && this.documentation.Contains("!#") && baseScope is CompiledScope)
|
||
return lst.ToArray();
|
||
|
||
if (baseScope != null && keyword != PascalABCCompiler.Parsers.KeywordKind.Constructor && keyword != PascalABCCompiler.Parsers.KeywordKind.Destructor)
|
||
lst.AddRange(baseScope.GetNames(ev, keyword, true));
|
||
/*if (topScope != null)
|
||
lst.AddRange(topScope.GetNames());*/
|
||
return lst.ToArray();
|
||
}
|
||
|
||
//poluchit vse imena kak po tochke iz objektnoj peremennoj, sootv. ekzemplarnye chleny klassa i nadklassov
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
//if (original_type != null)
|
||
// return original_type.GetNamesAsInObject(ev);
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
foreach (SymScope ss in GetMergedMembers())
|
||
{
|
||
if (ss is ProcScope && (ss as ProcScope).IsConstructor()) continue;
|
||
if (!IsHiddenName(ss.si.name) && !ss.is_static && !(ss is TemplateParameterScope))
|
||
{
|
||
if (ss.si.acc_mod == access_modifer.private_modifer)
|
||
{
|
||
if (ev.CheckPrivateForBaseAccess(ev.entry_scope, this))
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else if (ss.si.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
if (ev.CheckForBaseAccess(ev.entry_scope, this))
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
}
|
||
else
|
||
lst.Add(ss.WithRefreshedDescription().si);
|
||
if (!ss.si.has_doc)
|
||
UnitDocCache.AddDescribeToComplete(ss);
|
||
}
|
||
}
|
||
if (this.documentation != null && this.documentation.Contains("!#") && baseScope is CompiledScope)
|
||
return lst.ToArray();
|
||
if (baseScope != null)
|
||
{
|
||
lst.AddRange(baseScope.GetNamesAsInObject(ev));
|
||
}
|
||
if (implemented_interfaces != null && !(this is ArrayScope && (this as ArrayScope).IsMultiDynArray))
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
lst.AddRange(ts.GetNamesAsInObject(ev));
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public virtual TypeScope[] GetIndexers()
|
||
{
|
||
if (indexers == null)
|
||
return new TypeScope[0];
|
||
if (indexers.Count > 0)
|
||
return indexers.ToArray();
|
||
if (baseScope != null) return baseScope.GetIndexers();
|
||
else return indexers.ToArray();
|
||
}
|
||
|
||
public virtual TypeScope[] GetStaticIndexers()
|
||
{
|
||
if (static_indexers == null)
|
||
return new TypeScope[0];
|
||
if (static_indexers.Count > 0)
|
||
return static_indexers.ToArray();
|
||
if (baseScope != null) return baseScope.GetStaticIndexers();
|
||
else return static_indexers.ToArray();
|
||
}
|
||
|
||
public virtual void AddIndexer(TypeScope ts, bool is_static)
|
||
{
|
||
if (indexers == null)
|
||
indexers = new List<TypeScope>();
|
||
if (static_indexers == null)
|
||
static_indexers = new List<TypeScope>();
|
||
if (!is_static)
|
||
indexers.Add(ts);
|
||
else
|
||
static_indexers.Add(ts);
|
||
}
|
||
|
||
//poisk v classe, nadklassah i scope v kotorom klass opisan a takzhe vo vseh uses
|
||
public override SymScope FindName(string name)
|
||
{
|
||
//SymScope sc = ht[name] as SymScope;
|
||
SymScope sc = internal_find(name, true);
|
||
if (sc != null) return sc;
|
||
if (other_partials != null)
|
||
foreach (TypeScope part in other_partials)
|
||
{
|
||
sc = part.internal_find(name, true);
|
||
if (sc != null)
|
||
return sc;
|
||
}
|
||
if (baseScope != null) sc = baseScope.FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
if (topScope != null) return topScope.FindName(name);
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = internal_find_overloads(name, true);
|
||
if (other_partials != null)
|
||
foreach (TypeScope part in other_partials)
|
||
{
|
||
names.AddRange(part.internal_find_overloads(name, true));
|
||
}
|
||
if (baseScope != null)
|
||
names.AddRange(baseScope.FindOverloadNamesOnlyInType(name));
|
||
if (topScope != null)
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
//SymScope sc = ht[name] as SymScope;
|
||
SymScope sc = internal_find(name, false);
|
||
if (sc != null) return sc;
|
||
if (other_partials != null)
|
||
foreach (TypeScope part in other_partials)
|
||
{
|
||
sc = part.internal_find(name, true);
|
||
if (sc != null)
|
||
return sc;
|
||
}
|
||
if (baseScope != null) sc = baseScope.FindNameOnlyInType(name);
|
||
if (sc != null) return sc;
|
||
if (topScope != null) return topScope.FindNameInAnyOrder(name);
|
||
return null;
|
||
}
|
||
|
||
//poisk tolko v etom klasse
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
SymScope sc = null;
|
||
if (original_type != null)
|
||
return original_type.FindNameOnlyInThisType(name);
|
||
if (name != null)
|
||
sc = internal_find(name, false);
|
||
if (sc != null)
|
||
return sc;
|
||
if (other_partials != null)
|
||
foreach (TypeScope part in other_partials)
|
||
{
|
||
sc = part.internal_find(name, false);
|
||
if (sc != null)
|
||
return sc;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
//poisk tolko v klasse i nadklassah
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
SymScope sc = null;
|
||
if (name != null)
|
||
sc = internal_find(name, false);
|
||
if (sc != null)
|
||
return sc;
|
||
if (other_partials != null)
|
||
foreach (TypeScope part in other_partials)
|
||
{
|
||
sc = part.internal_find(name, false);
|
||
if (sc != null)
|
||
return sc;
|
||
}
|
||
if (sc == null && baseScope != null)
|
||
sc = baseScope.FindNameOnlyInType(name);
|
||
if (sc == null && implemented_interfaces != null)
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
{
|
||
if (ts != this)
|
||
sc = ts.FindNameOnlyInType(name);
|
||
if (sc != null)
|
||
break;
|
||
}
|
||
if (sc == null && original_type != null)
|
||
return original_type.FindNameOnlyInType(name);
|
||
if (sc != null && is_static && sc is ProcScope && (sc as ProcScope).IsConstructor())
|
||
return null;
|
||
return sc;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
List<SymScope> names = internal_find_overloads(name, false);
|
||
if (other_partials != null)
|
||
foreach (TypeScope part in other_partials)
|
||
{
|
||
names.AddRange(part.internal_find_overloads(name, false));
|
||
}
|
||
if (baseScope != null)
|
||
names.AddRange(baseScope.FindOverloadNamesOnlyInType(name));
|
||
if (implemented_interfaces != null)
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
{
|
||
names.AddRange(ts.FindOverloadNamesOnlyInType(name));
|
||
}
|
||
return names;
|
||
}
|
||
|
||
public override void AddName(string name, SymScope sc)
|
||
{
|
||
/*if (name != null)
|
||
ht[name] = sc;*/
|
||
sc.si.name = name;
|
||
if (members == null)
|
||
members = new List<SymScope>();
|
||
members.Add(sc);
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return si.name;
|
||
}
|
||
|
||
public IProcScope FindExtensionMethod(string name)
|
||
{
|
||
List<ProcScope> meths = null;
|
||
if (original_type != null)
|
||
meths = original_type.GetExtensionMethods(name, original_type);
|
||
else
|
||
meths = GetExtensionMethods(name, this);
|
||
if (meths != null && meths.Count > 0)
|
||
return meths[0];
|
||
return null;
|
||
}
|
||
}
|
||
|
||
// public class GenericInstanceScope : TypeScope, IGenericInstanceScope
|
||
// {
|
||
// public TypeScope actType;
|
||
// public List<TypeScope> gen_args;
|
||
//
|
||
// public GenericInstanceScope(TypeScope actType, List<TypeScope> gen_args)
|
||
// {
|
||
// this.actType = actType;
|
||
// this.gen_args = gen_args;
|
||
// CopyType();
|
||
// }
|
||
//
|
||
// private void CopyType()
|
||
// {
|
||
// actType = actType.GetInstance(List<TypeScope> gen_args);
|
||
// }
|
||
//
|
||
// }
|
||
|
||
/*public class NamespaceTypeScope : SymScope, INamespaceTypeScope
|
||
{
|
||
private CompiledScope entry_type;
|
||
|
||
public NamespaceTypeScope(CompiledScope entry_type)
|
||
{
|
||
this.entry_type = entry_type;
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.NamespaceTypeScope;
|
||
}
|
||
}
|
||
|
||
public override SymScope FindName(string s)
|
||
{
|
||
return entry_type.FindName(s);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
return entry_type.FindOverloadNames(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return entry_type.FindOverloadNamesOnlyInType(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return entry_type.FindNameOnlyInType(name);
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
return entry_type.FindName(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
return entry_type.GetStaticNames();
|
||
}
|
||
}*/
|
||
|
||
public class NamespaceScope : SymScope, INamespaceScope
|
||
{
|
||
public string name;
|
||
public CompiledScope entry_type;
|
||
|
||
public NamespaceScope(string name)
|
||
{
|
||
this.name = name;
|
||
this.si = new SymInfo(name, SymbolKind.Namespace, name);
|
||
BuildDescription();
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Namespace;
|
||
}
|
||
}
|
||
|
||
public override void BuildDescription()
|
||
{
|
||
si.description = CodeCompletionController.CurrentParser?.LanguageInformation.GetDescription(this);
|
||
}
|
||
|
||
private SymInfo convertToDefaultNETNames(Type t, SymInfo si)
|
||
{
|
||
if (!t.IsPrimitive)
|
||
return si;
|
||
SymInfo new_si = new SymInfo(si);
|
||
new_si.name = t.Name;
|
||
return new_si;
|
||
}
|
||
|
||
public SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword)
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
Type[] types = PascalABCCompiler.NetHelper.NetHelper.FindTypesInNamespace(name);
|
||
string[] ns = PascalABCCompiler.NetHelper.NetHelper.FindSubNamespaces(name);
|
||
|
||
Hashtable ht = new Hashtable();
|
||
if (keyword != PascalABCCompiler.Parsers.KeywordKind.Uses)
|
||
if (types != null)
|
||
foreach (Type t in types)
|
||
{
|
||
if (!t.IsNotPublic && !t.IsSpecialName && t.IsVisible && !IsHiddenName(t.Name) && !t.IsNested)
|
||
{
|
||
if (t.IsArray)
|
||
continue;
|
||
if (t.BaseType == typeof(MulticastDelegate))
|
||
//syms.Add(new CompiledScope(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Delegate, "delegate "+TypeUtility.GetTypeName(t) + "\n" + AssemblyDocCache.GetDocumentation(t)),t));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Delegate, null), t).WithRefreshedDescription().si);
|
||
else
|
||
if (t.IsClass)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Type, "class "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(convertToDefaultNETNames(t, TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Class, null), t).WithRefreshedDescription().si));
|
||
else if (t.IsInterface)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Interface, "interface "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Interface, null), t).WithRefreshedDescription().si);
|
||
else if (t.IsEnum)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Enum, "enum "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Enum, null), t).WithRefreshedDescription().si);
|
||
else if (t.IsValueType)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Struct, "record "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(convertToDefaultNETNames(t, TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Struct, null), t).WithRefreshedDescription().si));
|
||
}
|
||
}
|
||
|
||
if (ns != null)
|
||
foreach (string s in ns)
|
||
{
|
||
if (!s.Contains(".") && !IsHiddenName(s))
|
||
syms.Add(new SymInfo(s, SymbolKind.Namespace, ""));
|
||
}
|
||
if (syms.Count != 0) return syms.ToArray();
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = new List<SymScope>(0);
|
||
SymScope ss = FindName(name);
|
||
if (ss != null)
|
||
names.Add(ss);
|
||
return names;
|
||
}
|
||
|
||
public override SymScope FindName(string s)
|
||
{
|
||
string full_name = name + "." + s;
|
||
bool is_ns = PascalABCCompiler.NetHelper.NetHelper.IsNetNamespace(full_name);
|
||
if (is_ns)
|
||
{
|
||
return new NamespaceScope(full_name);
|
||
}
|
||
else
|
||
{
|
||
Type t = PascalABCCompiler.NetHelper.NetHelper.FindType(full_name);
|
||
if (t == null) t = PascalABCCompiler.NetHelper.NetHelper.FindType(full_name + StringConstants.generic_params_infix + "1");
|
||
if (t == null) t = PascalABCCompiler.NetHelper.NetHelper.FindType(full_name + StringConstants.generic_params_infix + "2");
|
||
if (t != null)
|
||
{
|
||
return TypeTable.get_compiled_type(new SymInfo(s, SymbolKind.Type, full_name), t);
|
||
}
|
||
else
|
||
{
|
||
List<PascalABCCompiler.TreeConverter.SymbolInfo> sil = null;
|
||
if (entry_type != null)
|
||
{
|
||
t = PascalABCCompiler.NetHelper.NetHelper.FindType(entry_type.ctn.Namespace + "." + s);
|
||
if (t != null) return TypeTable.get_compiled_type(new SymInfo(s, SymbolKind.Type, entry_type.ctn.Namespace + "." + s), t);
|
||
else
|
||
{
|
||
object[] attrs = entry_type.ctn.GetCustomAttributes(false);
|
||
for (int j = 0; j < attrs.Length; j++)
|
||
if (attrs[j].GetType().Name == "$GlobAttr")
|
||
{
|
||
sil = PascalABCCompiler.NetHelper.NetHelper.FindName(entry_type.ctn, s);
|
||
if (sil != null) break;
|
||
}
|
||
}
|
||
}
|
||
if (sil != null)
|
||
switch (sil.FirstOrDefault().sym_info.semantic_node_type)
|
||
{
|
||
case semantic_node_type.compiled_function_node:
|
||
{
|
||
CompiledMethodScope cms = new CompiledMethodScope(new SymInfo(s, SymbolKind.Method, s), (sil.FirstOrDefault().sym_info as compiled_function_node).method_info, entry_type, true);
|
||
sil.RemoveAt(0);
|
||
if (sil.Count() == 0)
|
||
sil = null;
|
||
CompiledMethodScope tmp = cms;
|
||
SortedDictionary<int, List<CompiledMethodScope>> meths = new SortedDictionary<int, List<CompiledMethodScope>>();
|
||
if (cms.acc_mod != access_modifer.internal_modifer && cms.acc_mod != access_modifer.private_modifer)
|
||
{
|
||
int par_num = cms.mi.GetParameters().Length;
|
||
meths[par_num] = new List<CompiledMethodScope>();
|
||
meths[par_num].Add(cms);
|
||
}
|
||
if (sil != null)
|
||
{
|
||
foreach(var si in sil)
|
||
{
|
||
if (si.access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && si.access_level != PascalABCCompiler.TreeConverter.access_level.al_private && si.sym_info.semantic_node_type == semantic_node_type.compiled_function_node)
|
||
{
|
||
tmp = new CompiledMethodScope(new SymInfo(s, SymbolKind.Method, s), (si.sym_info as compiled_function_node).method_info, entry_type);
|
||
tmp.is_global = true;
|
||
//tmp.nextProc = cms;
|
||
//cms = tmp;
|
||
int par_num = tmp.mi.GetParameters().Length;
|
||
if (!meths.ContainsKey(par_num))
|
||
meths[par_num] = new List<CompiledMethodScope>();
|
||
meths[par_num].Add(tmp);
|
||
}
|
||
}
|
||
}
|
||
bool beg = false;
|
||
tmp = null;
|
||
cms = null;
|
||
foreach (List<CompiledMethodScope> lst in meths.Values)
|
||
{
|
||
foreach (CompiledMethodScope m in lst)
|
||
{
|
||
if (beg == false)
|
||
{
|
||
tmp = m;
|
||
cms = tmp;
|
||
beg = true;
|
||
}
|
||
else
|
||
{
|
||
tmp.nextProc = m;
|
||
tmp = tmp.nextProc as CompiledMethodScope;
|
||
}
|
||
}
|
||
}
|
||
return cms;
|
||
}
|
||
case semantic_node_type.compiled_variable_definition:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
{
|
||
CompiledFieldScope fld = new CompiledFieldScope(new SymInfo(s, SymbolKind.Field, s), (sil.FirstOrDefault().sym_info as compiled_variable_definition).compiled_field, entry_type, true);
|
||
return fld;
|
||
}
|
||
break;
|
||
case semantic_node_type.compiled_class_constant_definition:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
{
|
||
CompiledFieldScope fld = new CompiledFieldScope(new SymInfo(s, SymbolKind.Constant, s), (sil.FirstOrDefault().sym_info as compiled_class_constant_definition).field, entry_type, true);
|
||
return fld;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is NamespaceScope)
|
||
return string.Compare(this.name, (ts as NamespaceScope).name, true) == 0;
|
||
return false;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return FindName(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return FindOverloadNames(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
Type[] types = PascalABCCompiler.NetHelper.NetHelper.FindTypesInNamespace(name);
|
||
string[] ns = PascalABCCompiler.NetHelper.NetHelper.FindSubNamespaces(name);
|
||
|
||
Hashtable ht = new Hashtable();
|
||
if (types != null)
|
||
foreach (Type t in types)
|
||
{
|
||
if (!t.IsNotPublic && !t.IsSpecialName && t.IsVisible && !IsHiddenName(t.Name) && !t.IsNested)
|
||
{
|
||
if (t.BaseType == typeof(MulticastDelegate))
|
||
//syms.Add(new CompiledScope(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Delegate, "delegate "+TypeUtility.GetTypeName(t) + "\n" + AssemblyDocCache.GetDocumentation(t)),t));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Delegate, null), t).WithRefreshedDescription().si);
|
||
else
|
||
if (t.IsClass)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Class, "class "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Class, null), t).WithRefreshedDescription().si);
|
||
else if (t.IsInterface)
|
||
// syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Interface, "interface "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Interface, null), t).WithRefreshedDescription().si);
|
||
else if (t.IsEnum)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Enum, "enum "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Enum, null), t).WithRefreshedDescription().si);
|
||
else if (t.IsValueType)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Struct, "record "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Struct, null), t).WithRefreshedDescription().si);
|
||
}
|
||
}
|
||
|
||
if (ns != null)
|
||
foreach (string s in ns)
|
||
{
|
||
syms.Add(new SymInfo(s, SymbolKind.Namespace, ""));
|
||
}
|
||
return syms.ToArray();
|
||
//return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
Type[] types = PascalABCCompiler.NetHelper.NetHelper.FindTypesInNamespace(name);
|
||
string[] ns = PascalABCCompiler.NetHelper.NetHelper.FindSubNamespaces(name);
|
||
|
||
Hashtable ht = new Hashtable();
|
||
if (types != null)
|
||
foreach (Type t in types)
|
||
{
|
||
if (!t.IsNotPublic && !t.IsSpecialName && t.IsVisible && !IsHiddenName(t.Name))
|
||
{
|
||
if (t.BaseType == typeof(MulticastDelegate))
|
||
//syms.Add(new CompiledScope(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Delegate, "delegate "+TypeUtility.GetTypeName(t) + "\n" + AssemblyDocCache.GetDocumentation(t)),t));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Delegate, null), t).si);
|
||
else
|
||
if (t.IsClass)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Class, "class "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Class, null), t).si);
|
||
else if (t.IsInterface)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Interface, "interface "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Interface, null), t).si);
|
||
else if (t.IsEnum)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Enum, "enum "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Enum, null), t).si);
|
||
else if (t.IsValueType)
|
||
//syms.Add(new SymInfo(TypeUtility.GetShortTypeName(t), SymbolKind.Struct, "record "+TypeUtility.GetTypeName(t)+ "\n" +AssemblyDocCache.GetDocumentation(t)));
|
||
syms.Add(TypeTable.get_compiled_type(new SymInfo(null, SymbolKind.Struct, null), t).si);
|
||
}
|
||
}
|
||
|
||
return syms.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
return GetNames();
|
||
}
|
||
}
|
||
|
||
public class CompiledScope : TypeScope, ICompiledTypeScope
|
||
{
|
||
public Type ctn;
|
||
private TypeScope[] indices;
|
||
private PropertyInfo default_property;
|
||
private bool is_def_prop_searched = false;
|
||
|
||
public CompiledScope(SymInfo si, Type ctn)
|
||
{
|
||
this.ctn = ctn;
|
||
this.si = si;
|
||
this.instances = new List<TypeScope>();
|
||
if (ctn == null)
|
||
{
|
||
|
||
}
|
||
if (ctn.BaseType != null)
|
||
baseScope = TypeTable.get_compiled_type(ctn.BaseType);
|
||
Type t = ctn.GetElementType();
|
||
if (t == null && ctn == typeof(string))
|
||
t = typeof(char);
|
||
if (t != null)
|
||
{
|
||
elementType = TypeTable.get_compiled_type(t);
|
||
is_def_prop_searched = true;
|
||
}
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, ctn);
|
||
this.si.name = CodeCompletionController.CurrentParser?.LanguageInformation.GetShortName(this);
|
||
this.si.kind = get_kind();
|
||
this.si.description = GetDescription();
|
||
|
||
if (ctn.IsGenericType && !ctn.IsGenericTypeDefinition)
|
||
{
|
||
this.original_type = TypeTable.get_compiled_type(ctn.GetGenericTypeDefinition());
|
||
}
|
||
|
||
if (ctn.IsGenericType /*&& ctn.IsGenericTypeDefinition*/)
|
||
{
|
||
generic_params = new List<string>();
|
||
foreach (Type gen_t in ctn.GetGenericArguments())
|
||
{
|
||
generic_params.Add(gen_t.Name);
|
||
}
|
||
}
|
||
if (ctn.GetInterfaces().Length > 0)
|
||
{
|
||
this.implemented_interfaces = new List<TypeScope>();
|
||
foreach (Type intf in ctn.GetInterfaces())
|
||
{
|
||
this.implemented_interfaces.Add(TypeTable.get_compiled_type(intf));
|
||
}
|
||
}
|
||
}
|
||
|
||
public ICompiledTypeScope[] GetCompiledGenericArguments()
|
||
{
|
||
List<ICompiledTypeScope> types = new List<ICompiledTypeScope>();
|
||
foreach (Type t in ctn.GetGenericArguments())
|
||
types.Add(TypeTable.get_compiled_type(t));
|
||
return types.ToArray();
|
||
}
|
||
|
||
internal static TypeScope get_type_instance(Type t, List<TypeScope> generic_args)
|
||
{
|
||
if (t.IsGenericParameter)
|
||
{
|
||
if (t.GenericParameterPosition < generic_args.Count)
|
||
return generic_args[t.GenericParameterPosition];
|
||
else if (generic_args.Count > 0)
|
||
return generic_args[0];
|
||
else
|
||
return TypeTable.get_compiled_type(null, t);
|
||
}
|
||
if (t.IsArray)
|
||
return new ArrayScope(get_type_instance(t.GetElementType(), generic_args), null);
|
||
if (t.ContainsGenericParameters)
|
||
{
|
||
CompiledScope typ = new CompiledScope(new SymInfo(t.Name, SymbolKind.Type, t.Name), t);
|
||
typ.generic_params = new List<string>();
|
||
typ.original_type = TypeTable.get_compiled_type(new SymInfo(t.Name, SymbolKind.Type, t.Name), t);
|
||
Type[] args = t.GetGenericArguments();
|
||
for (int i = 0; i < args.Length; i++)
|
||
{
|
||
if (args[i].IsGenericParameter)
|
||
{
|
||
if (args[i].GenericParameterPosition < generic_args.Count)
|
||
{
|
||
typ.generic_params.Add(generic_args[args[i].GenericParameterPosition].si.name);
|
||
typ.AddGenericInstanciation(generic_args[args[i].GenericParameterPosition]);
|
||
}
|
||
else if (i<generic_args.Count)
|
||
{
|
||
typ.generic_params.Add(generic_args[i].si.name);
|
||
typ.AddGenericInstanciation(generic_args[i]);
|
||
}
|
||
}
|
||
else
|
||
{
|
||
TypeScope ts = get_type_instance(args[i], generic_args);
|
||
typ.generic_params.Add(ts.si.name);
|
||
typ.AddGenericInstanciation(ts);
|
||
}
|
||
}
|
||
typ.si.description = typ.GetDescription();
|
||
return typ;
|
||
}
|
||
return TypeTable.get_compiled_type(t);
|
||
}
|
||
|
||
/*public override ITypeScope ElementType
|
||
{
|
||
get
|
||
{
|
||
return GetElementType();
|
||
}
|
||
}*/
|
||
|
||
public override bool IsStatic
|
||
{
|
||
get
|
||
{
|
||
return ctn.IsSealed && ctn.IsAbstract;
|
||
}
|
||
}
|
||
|
||
public override bool IsGeneric
|
||
{
|
||
get
|
||
{
|
||
return original_type != null;
|
||
}
|
||
}
|
||
|
||
public override bool IsDelegate
|
||
{
|
||
get
|
||
{
|
||
return ctn == PascalABCCompiler.NetHelper.NetHelper.MulticastDelegateType || ctn.BaseType == PascalABCCompiler.NetHelper.NetHelper.MulticastDelegateType;
|
||
}
|
||
}
|
||
|
||
public override int Rank
|
||
{
|
||
get
|
||
{
|
||
return this.ctn.GetArrayRank();
|
||
}
|
||
}
|
||
|
||
public override List<TypeScope> GetInstances()
|
||
{
|
||
if (this.instances.Count == 0 && ctn.IsGenericType && !ctn.IsGenericTypeDefinition)
|
||
{
|
||
foreach (Type inst_t in ctn.GetGenericArguments())
|
||
this.instances.Add(TypeTable.get_compiled_type(inst_t));
|
||
}
|
||
return base.GetInstances();
|
||
}
|
||
|
||
private SymbolKind get_kind()
|
||
{
|
||
if (ctn.BaseType == typeof(MulticastDelegate)) return SymbolKind.Delegate;
|
||
if (ctn.IsClass) return SymbolKind.Class;
|
||
if (ctn.IsInterface) return SymbolKind.Interface;
|
||
if (ctn.IsEnum) return SymbolKind.Enum;
|
||
if (ctn.IsValueType) return SymbolKind.Struct;
|
||
return SymbolKind.Type;
|
||
}
|
||
|
||
public override TypeScope GenericTypeDefinition
|
||
{
|
||
get
|
||
{
|
||
if (this.ctn.IsGenericType)
|
||
return TypeTable.get_compiled_type(this.ctn.GetGenericTypeDefinition());
|
||
return this;
|
||
}
|
||
}
|
||
|
||
public override bool IsGenericParameter
|
||
{
|
||
get
|
||
{
|
||
return this.ctn.IsGenericParameter;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.CompiledType;
|
||
}
|
||
}
|
||
|
||
public override bool IsArray
|
||
{
|
||
get
|
||
{
|
||
return ctn.IsArray;
|
||
}
|
||
}
|
||
|
||
public override PascalABCCompiler.Parsers.SymbolKind ElemKind
|
||
{
|
||
get
|
||
{
|
||
if (TypeUtility.IsStandType(ctn)) return PascalABCCompiler.Parsers.SymbolKind.Type;
|
||
if (ctn.IsClass) return PascalABCCompiler.Parsers.SymbolKind.Class;
|
||
if (ctn.IsEnum) return PascalABCCompiler.Parsers.SymbolKind.Enum;
|
||
if (ctn.IsValueType) return PascalABCCompiler.Parsers.SymbolKind.Struct;
|
||
if (ctn.IsInterface) return PascalABCCompiler.Parsers.SymbolKind.Interface;
|
||
return PascalABCCompiler.Parsers.SymbolKind.Type;
|
||
}
|
||
}
|
||
|
||
public override bool IsFinal
|
||
{
|
||
get
|
||
{
|
||
return ctn.IsSealed;
|
||
}
|
||
}
|
||
|
||
public override bool IsAbstract
|
||
{
|
||
get
|
||
{
|
||
return ctn.IsAbstract;
|
||
}
|
||
}
|
||
|
||
public Type CompiledType
|
||
{
|
||
get
|
||
{
|
||
return ctn;
|
||
}
|
||
}
|
||
|
||
protected override TypeScope simpleGetInstance(List<TypeScope> gen_args)
|
||
{
|
||
return this.GetInstance(gen_args);
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
if (!ctn.IsGenericType)
|
||
return this;
|
||
|
||
InstanceCreationContext info = new InstanceCreationContext(this, gen_args, exact);
|
||
|
||
if (instance_cache.TryGetValue(info, out var instance))
|
||
{
|
||
return instance;
|
||
}
|
||
|
||
Type t = this.ctn;
|
||
if (!ctn.IsGenericTypeDefinition)
|
||
{
|
||
t = PascalABCCompiler.NetHelper.NetHelper.FindType(this.ctn.Namespace + "." + this.ctn.Name);
|
||
if (t == null && this.instances != null && this.instances.Count > 0 && ctn.DeclaringType != null && this.ctn.DeclaringType.IsGenericTypeDefinition)
|
||
{
|
||
t = PascalABCCompiler.NetHelper.NetHelper.FindType(this.ctn.Namespace + "." + this.ctn.DeclaringType.Name.Substring(0, this.ctn.DeclaringType.Name.IndexOf('`')) + "`" + this.instances.Count + "+" + ctn.Name);
|
||
}
|
||
}
|
||
else if (this.instances != null && this.instances.Count > 0)
|
||
{
|
||
if (this.instances.Count != ctn.GetGenericArguments().Length)
|
||
{
|
||
Type t2 = PascalABCCompiler.NetHelper.NetHelper.FindType(this.ctn.Namespace + "." + this.ctn.Name.Substring(0, this.ctn.Name.IndexOf('`')) + "`" + this.instances.Count);
|
||
if (t2 != null)
|
||
t = t2;
|
||
}
|
||
|
||
}
|
||
else if (gen_args.Count != ctn.GetGenericArguments().Length)
|
||
{
|
||
Type t2 = PascalABCCompiler.NetHelper.NetHelper.FindType(this.ctn.Namespace + "." + this.ctn.Name.Substring(0, this.ctn.Name.IndexOf('`')) + "`" + gen_args.Count);
|
||
if (t2 != null)
|
||
t = t2;
|
||
}
|
||
CompiledScope sc = new CompiledScope(new SymInfo(si.name, si.kind, si.description), t);
|
||
sc.generic_params = new List<string>();
|
||
sc.instances = new List<TypeScope>();
|
||
sc.original_type = this;
|
||
if (this.instances != null && this.instances.Count > 0)
|
||
for (int i = 0; i < this.instances.Count; i++)
|
||
{
|
||
if (this.instances[i] is UnknownScope || this.instances[i] is TemplateParameterScope)
|
||
{
|
||
List<TypeScope> lst = new List<TypeScope>();
|
||
TypeScope ts = gen_args[Math.Min(i, gen_args.Count - 1)];
|
||
if (ts.instances != null && ts.instances.Count > 0 && !exact)
|
||
{
|
||
List<string> template_args = ts.original_type.generic_params;
|
||
int ind = template_args.IndexOf(this.instances[i].name);
|
||
if (ind != -1)
|
||
{
|
||
sc.instances.Add(ts.instances[ind]);
|
||
sc.generic_params.Add(ts.generic_params[ind]);
|
||
continue;
|
||
}
|
||
}
|
||
lst.Add(gen_args[Math.Min(i, gen_args.Count - 1)]);
|
||
if (lst[0].instances != null && lst[0].instances.Count > 0)
|
||
lst[0] = lst[0].instances[Math.Min(i, lst[0].instances.Count - 1)];
|
||
if (exact)
|
||
sc.instances.Add(gen_args[Math.Min(i, gen_args.Count - 1)]);
|
||
else
|
||
sc.instances.Add(this.instances[i].GetInstance(lst));
|
||
if (i < gen_args.Count)
|
||
sc.generic_params.Add(gen_args[i].si.name);
|
||
}
|
||
else
|
||
{
|
||
if (this.instances[i].instances != null && this.instances[i].instances.Count > 0 && i < gen_args.Count && gen_args[i].elementType != null)
|
||
{
|
||
List<TypeScope> lst = new List<TypeScope>();
|
||
lst.Add(gen_args[i].elementType);
|
||
sc.instances.Add(this.instances[i].GetInstance(lst));
|
||
if (i < gen_args.Count)
|
||
sc.generic_params.Add(gen_args[i].elementType.si.name);
|
||
}
|
||
else
|
||
{
|
||
if (i < gen_args.Count && gen_args[i] != null)
|
||
sc.generic_params.Add(gen_args[i].si.name);
|
||
if (this.instances[i].original_type == null && !(this.instances[i].elementType is TemplateParameterScope))
|
||
{
|
||
if (exact)
|
||
sc.instances.Add(gen_args[Math.Min(i, gen_args.Count - 1)]);
|
||
else
|
||
sc.instances.Add(this.instances[i]);
|
||
}
|
||
|
||
else
|
||
sc.instances.Add(this.instances[i].GetInstance(gen_args));
|
||
}
|
||
|
||
}
|
||
}
|
||
else
|
||
for (int i = 0; i < gen_args.Count; i++)
|
||
{
|
||
if (gen_args[i] == null)
|
||
continue;
|
||
if (i < gen_args.Count)
|
||
sc.generic_params.Add(gen_args[i].si.name);
|
||
sc.instances.Add(gen_args[i]);
|
||
}
|
||
sc.implemented_interfaces = new List<TypeScope>();
|
||
if (this.implemented_interfaces != null)
|
||
for (int i = 0; i < this.implemented_interfaces.Count; i++)
|
||
sc.implemented_interfaces.Add(this.implemented_interfaces[i].GetInstance(gen_args));
|
||
sc.si.description = sc.GetDescription();
|
||
|
||
instance_cache[info] = sc;
|
||
|
||
return sc;
|
||
}
|
||
|
||
private void get_default_property()
|
||
{
|
||
PropertyInfo[] pis = ctn.GetProperties();
|
||
is_def_prop_searched = true;
|
||
for (int i = 0; i < pis.Length; i++)
|
||
{
|
||
ParameterInfo[] prms = pis[i].GetIndexParameters();
|
||
if (prms.Length > 0)
|
||
{
|
||
default_property = pis[i];
|
||
if (generic_params != null && default_property.PropertyType.IsGenericParameter)
|
||
{
|
||
elementType = instances[default_property.PropertyType.GenericParameterPosition];
|
||
}
|
||
else
|
||
elementType = TypeTable.get_compiled_type(pis[i].PropertyType);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
public override string GetFullName()
|
||
{
|
||
//return ctn.FullName;
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetSimpleDescription(this);
|
||
}
|
||
|
||
public override List<ProcScope> GetOverridableMethods()
|
||
{
|
||
List<ProcScope> syms = new List<ProcScope>();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy);
|
||
if (ctn.IsInterface)
|
||
{
|
||
List<MemberInfo> mems = new List<MemberInfo>();
|
||
mems.AddRange(mis);
|
||
Type[] tt = ctn.GetInterfaces();
|
||
foreach (Type t in tt)
|
||
mems.AddRange(t.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy));
|
||
mis = mems.ToArray();
|
||
}
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
CompiledMethodScope member = new CompiledMethodScope(si2, mi as MethodInfo, this);
|
||
si2 = member.si;
|
||
if ((mi as MethodInfo).IsVirtual && !(mi as MethodInfo).IsFinal)
|
||
{
|
||
if (si2.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
syms.Add((ProcScope)member.WithRefreshedDescription());
|
||
}
|
||
else if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add((ProcScope)member.WithRefreshedDescription());
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
return syms;
|
||
}
|
||
|
||
public override List<ProcScope> GetAbstractMethods()
|
||
{
|
||
List<ProcScope> syms = new List<ProcScope>();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy);
|
||
if (ctn.IsInterface)
|
||
{
|
||
List<MemberInfo> mems = new List<MemberInfo>();
|
||
mems.AddRange(mis);
|
||
Type[] tt = ctn.GetInterfaces();
|
||
foreach (Type t in tt)
|
||
mems.AddRange(t.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy));
|
||
mis = mems.ToArray();
|
||
}
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
CompiledMethodScope member = new CompiledMethodScope(si2, mi as MethodInfo, this);
|
||
si2 = member.si;
|
||
if ((mi as MethodInfo).IsAbstract || (ctn.IsInterface && (mi as MethodInfo).DeclaringType == ctn))
|
||
{
|
||
if (si2.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
syms.Add((ProcScope)member.WithRefreshedDescription());
|
||
}
|
||
else if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add((ProcScope)member.WithRefreshedDescription());
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
return syms;
|
||
}
|
||
|
||
private void AddIndexers()
|
||
{
|
||
List<TypeScope> indexers = new List<TypeScope>();
|
||
if (ctn.IsArray)
|
||
{
|
||
/*Type t = ctn.GetElementType();
|
||
while (t != null)
|
||
{
|
||
indexers.Add(new CompiledScope(new SymInfo(t.Name, SymbolKind.Type,t.FullName),t));
|
||
t = t.GetElementType();
|
||
}*/
|
||
Type t = typeof(int);
|
||
indexers.Add(TypeTable.get_compiled_type(t));
|
||
}
|
||
else
|
||
{
|
||
if (!is_def_prop_searched) get_default_property();
|
||
if (default_property != null)
|
||
{
|
||
ParameterInfo[] pis = default_property.GetIndexParameters();
|
||
for (int i = 0; i < pis.Length; i++)
|
||
{
|
||
if (generic_params != null && pis[i].ParameterType.IsGenericParameter)
|
||
{
|
||
indexers.Add(instances[pis[i].ParameterType.GenericParameterPosition]);
|
||
}
|
||
else
|
||
indexers.Add(TypeTable.get_compiled_type(pis[i].ParameterType));
|
||
}
|
||
}
|
||
}
|
||
indices = indexers.ToArray();
|
||
}
|
||
|
||
public override TypeScope[] GetIndexers()
|
||
{
|
||
if (indices == null) AddIndexers();
|
||
return indices;
|
||
}
|
||
|
||
public override void ClearInstances()
|
||
{
|
||
if (instances != null)
|
||
instances.Clear();
|
||
}
|
||
|
||
public override bool IsConvertable(TypeScope ts, bool strong = false)
|
||
{
|
||
CompiledScope cs = ts as CompiledScope;
|
||
if (ts == null)
|
||
return true;
|
||
if (ts is NullTypeScope && !ctn.IsValueType)
|
||
return true;
|
||
if (cs == null)
|
||
if (ts is TypeSynonim)
|
||
return this.IsConvertable((ts as TypeSynonim).actType, strong);
|
||
else
|
||
if (ts is ShortStringScope && ctn == typeof(string))
|
||
return true;
|
||
else
|
||
{
|
||
if (ts is UnknownScope)
|
||
return true;
|
||
else if (ts is TemplateParameterScope)
|
||
return true;
|
||
else if (ts is ProcType)
|
||
{
|
||
ProcType pt = ts as ProcType;
|
||
MethodInfo invoke_meth = this.ctn.GetMethod("Invoke");
|
||
if (invoke_meth == null)
|
||
{
|
||
if (this.ctn == typeof(Delegate))
|
||
return true;
|
||
return false;
|
||
}
|
||
if (pt.target.parameters == null)
|
||
if (invoke_meth.GetParameters().Length > 0)
|
||
return false;
|
||
if (pt.target.parameters != null && pt.target.parameters.Count != invoke_meth.GetParameters().Length)
|
||
return false;
|
||
ParameterInfo[] parameters = invoke_meth.GetParameters();
|
||
for (int i = 0; i < parameters.Length; i++)
|
||
{
|
||
CompiledScope param_cs = TypeTable.get_compiled_type(null, parameters[i].ParameterType);
|
||
if (!(pt.target.parameters[i].sc is TypeScope) || !param_cs.IsConvertable(pt.target.parameters[i].sc as TypeScope, strong))
|
||
return false;
|
||
}
|
||
return CompiledScope.get_type_instance(invoke_meth.ReturnType, new List<TypeScope>()).IsConvertable(pt.target.return_type);
|
||
}
|
||
else
|
||
return false;
|
||
}
|
||
if (this.ctn == cs.ctn)
|
||
return true;
|
||
if (cs.ctn.IsByRef && this.ctn == cs.ctn.GetElementType())
|
||
return true;
|
||
if (this.ctn.IsSubclassOf(cs.ctn))
|
||
return true;
|
||
if (implemented_interfaces != null)
|
||
foreach (TypeScope interf in implemented_interfaces)
|
||
if (interf.IsEqual(ts))
|
||
return true;
|
||
TypeCode code1 = Type.GetTypeCode(this.ctn);
|
||
TypeCode code2 = Type.GetTypeCode(cs.ctn);
|
||
bool left = false;
|
||
bool right = false;
|
||
switch (code1)
|
||
{
|
||
case TypeCode.Boolean:
|
||
case TypeCode.Byte:
|
||
case TypeCode.Char:
|
||
case TypeCode.Double:
|
||
case TypeCode.Int16:
|
||
case TypeCode.Int32:
|
||
case TypeCode.Int64:
|
||
case TypeCode.Object:
|
||
case TypeCode.SByte:
|
||
case TypeCode.Single:
|
||
case TypeCode.String:
|
||
case TypeCode.UInt16:
|
||
case TypeCode.UInt32:
|
||
case TypeCode.UInt64:
|
||
left = true;
|
||
break;
|
||
}
|
||
switch (code2)
|
||
{
|
||
case TypeCode.Boolean:
|
||
case TypeCode.Byte:
|
||
case TypeCode.Char:
|
||
case TypeCode.Double:
|
||
case TypeCode.Int16:
|
||
case TypeCode.Int32:
|
||
case TypeCode.Int64:
|
||
case TypeCode.Object:
|
||
case TypeCode.SByte:
|
||
case TypeCode.Single:
|
||
case TypeCode.String:
|
||
case TypeCode.UInt16:
|
||
case TypeCode.UInt32:
|
||
case TypeCode.UInt64:
|
||
right = true;
|
||
break;
|
||
}
|
||
if (left && right)
|
||
{
|
||
type_compare tc = PascalABCCompiler.TreeRealization.type_table.compare_types(
|
||
compiled_type_node.get_type_node(this.ctn),
|
||
compiled_type_node.get_type_node(cs.ctn));
|
||
if (tc == type_compare.less_type)
|
||
{
|
||
if (code1 != TypeCode.String && code1 != TypeCode.Object)
|
||
if (code1 == TypeCode.Double && code2 != TypeCode.Single)
|
||
return false;
|
||
else if (strong && code1 == TypeCode.Char && code2 != TypeCode.Char && code2 != TypeCode.String)
|
||
return false;
|
||
else
|
||
return true;
|
||
}
|
||
if (cs.ctn.IsGenericParameter || this.ctn.IsGenericParameter)
|
||
return true;
|
||
if (!strong && tc == type_compare.greater_type && this.ctn.IsPrimitive && cs.ctn.IsPrimitive)
|
||
{
|
||
if (code1 != TypeCode.Double && code2 != TypeCode.Single)
|
||
return true;
|
||
}
|
||
return tc == type_compare.less_type;
|
||
}
|
||
else
|
||
{
|
||
List<SymScope> conv1 = this.FindOverloadNamesOnlyInType("op_Implicit");
|
||
List<SymScope> conv2 = cs.FindOverloadNamesOnlyInType("op_Implicit");
|
||
if (conv1.Count > 0)
|
||
{
|
||
for (int i = 0; i < conv1.Count; i++)
|
||
if (conv1[i] is ProcScope)
|
||
{
|
||
ProcScope ps = conv1[i] as ProcScope;
|
||
if (ps.parameters != null && ps.parameters.Count > 0 && ps.parameters[0].sc == cs)
|
||
return true;
|
||
}
|
||
}
|
||
else if (conv2.Count > 0)
|
||
{
|
||
for (int i = 0; i < conv2.Count; i++)
|
||
if (conv2[i] is ProcScope)
|
||
{
|
||
ProcScope ps = conv2[i] as ProcScope;
|
||
if (ps.parameters != null && ps.parameters.Count > 0 && ps.parameters[0].sc == cs)
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
CompiledScope cs = ts as CompiledScope;
|
||
if (cs == null)
|
||
if (ts is TypeSynonim) return this.IsEqual((ts as TypeSynonim).actType);
|
||
else return false;
|
||
return this.ctn == cs.ctn;
|
||
}
|
||
|
||
public override void AddIndexer(TypeScope ts, bool is_static)
|
||
{
|
||
|
||
}
|
||
|
||
public override string GetDescription()
|
||
{
|
||
return CodeCompletionController.CurrentParser?.LanguageInformation.GetDescription(this);
|
||
}
|
||
|
||
public override SymInfo[] GetNames(ExpressionVisitor ev, PascalABCCompiler.Parsers.KeywordKind keyword, bool called_in_base)
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return syms.ToArray();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.NonPublic |/*BindingFlags.Instance|*/BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||
List<MemberInfo> constrs = new List<MemberInfo>();
|
||
//constrs.AddRange(ctn.GetNestedTypes(BindingFlags.Public));
|
||
//if (ctn != typeof(object))
|
||
ConstructorInfo[] cis = ctn.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||
foreach (ConstructorInfo ci in cis)
|
||
if (!called_in_base)
|
||
constrs.Add(ci);
|
||
else if (ci.GetParameters().Length > 0)
|
||
constrs.Add(ci);
|
||
constrs.AddRange(mis);
|
||
//constrs.AddRange(PascalABCCompiler.NetHelper.NetHelper.GetExtensionMethods(ctn));
|
||
mis = constrs.ToArray();
|
||
if (ctn.IsInterface)
|
||
{
|
||
return syms.ToArray();
|
||
}
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsSpecialName && (mi as MethodInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledMethodScope(si2, mi as MethodInfo, this).si, ev);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if (!(mi as FieldInfo).IsSpecialName && (mi as FieldInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledFieldScope(si2, mi as FieldInfo, this).si, ev);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Constructor:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledConstructorScope(si2, mi as ConstructorInfo, this).si, ev);
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
PropertyInfo pi = mi as PropertyInfo;
|
||
if (pi.GetGetMethod(true) != null && pi.GetGetMethod(true).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledPropertyScope(si2, mi as PropertyInfo, this).si, ev);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
MethodInfo acc_mi = (mi as EventInfo).GetAddMethod(true);
|
||
if (acc_mi != null && acc_mi.IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledEventScope(si2, mi as EventInfo, this).si, ev);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.NestedType:
|
||
{
|
||
if ((mi as Type).IsNestedPublic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Type, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, TypeTable.get_compiled_type(si2, mi as Type).si, ev);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
|
||
public override ProcScope GetConstructor()
|
||
{
|
||
ConstructorInfo[] constrs = ctn.GetConstructors();
|
||
ProcScope ps = null;
|
||
ProcScope tmp = null;
|
||
if (constrs.Length > 0)
|
||
{
|
||
ps = new CompiledConstructorScope(new SymInfo("constructor", SymbolKind.Method, "constructor"), constrs[0], this);
|
||
tmp = ps;
|
||
}
|
||
for (int i = 1; i < constrs.Length; i++)
|
||
{
|
||
tmp.nextProc = new CompiledConstructorScope(new SymInfo("constructor", SymbolKind.Method, "constructor"), constrs[i], this);
|
||
tmp = tmp.nextProc;
|
||
}
|
||
return ps;
|
||
}
|
||
|
||
public override List<ProcScope> GetConstructors(bool search_in_base)
|
||
{
|
||
ConstructorInfo[] constrs = ctn.GetConstructors();
|
||
ProcScope ps = null;
|
||
ProcScope tmp = null;
|
||
List<ProcScope> names = new List<ProcScope>();
|
||
if (constrs.Length > 0)
|
||
{
|
||
ps = new CompiledConstructorScope(new SymInfo("constructor", SymbolKind.Method, "constructor"), constrs[0], this);
|
||
names.Add(ps);
|
||
tmp = ps;
|
||
}
|
||
for (int i = 1; i < constrs.Length; i++)
|
||
{
|
||
tmp.nextProc = new CompiledConstructorScope(new SymInfo("constructor", SymbolKind.Method, "constructor"), constrs[i], this);
|
||
names.Add(tmp.nextProc);
|
||
tmp = tmp.nextProc;
|
||
}
|
||
return names;
|
||
}
|
||
|
||
public SymInfo[] GetStaticNames()
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return syms.ToArray();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.NonPublic |/*BindingFlags.Instance|*/BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||
|
||
if (ctn.IsInterface)
|
||
{
|
||
return syms.ToArray();
|
||
}
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsSpecialName && (mi as MethodInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
CompiledMethodScope member = new CompiledMethodScope(si2, mi as MethodInfo, this);
|
||
si2 = member.si;
|
||
if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if (!(mi as FieldInfo).IsSpecialName && (mi as FieldInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
si2 = new CompiledFieldScope(si2, mi as FieldInfo, this).si;
|
||
if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add(si2);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Constructor:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
CompiledConstructorScope member = new CompiledConstructorScope(si2, mi as ConstructorInfo, this);
|
||
si2 = member.si;
|
||
if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
PropertyInfo pi = mi as PropertyInfo;
|
||
if (pi.GetGetMethod(true) != null && pi.GetGetMethod(true).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
si2 = new CompiledPropertyScope(si2, mi as PropertyInfo, this).si;
|
||
if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add(si2);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
MethodInfo acc_mi = (mi as EventInfo).GetAddMethod(true);
|
||
if (acc_mi != null && acc_mi.IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
si2 = new CompiledEventScope(si2, mi as EventInfo, this).si;
|
||
syms.Add(si2);
|
||
if (si2.acc_mod != access_modifer.private_modifer && si2.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add(si2);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.NestedType:
|
||
{
|
||
if ((mi as Type).IsNestedPublic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Type, null);
|
||
CompiledScope member = TypeTable.get_compiled_type(si2, mi as Type);
|
||
si2 = member.si;
|
||
syms.Add(si2);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return syms.ToArray();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy);
|
||
List<MemberInfo> members = new List<MemberInfo>();
|
||
members.AddRange(mis);
|
||
IEnumerable<MemberInfo> en = PascalABCCompiler.NetHelper.NetHelper.GetExtensionMethods(ctn);
|
||
members.AddRange(en);
|
||
mis = members.ToArray();
|
||
if (ctn.IsInterface)
|
||
{
|
||
List<MemberInfo> mems = new List<MemberInfo>();
|
||
mems.AddRange(mis);
|
||
mems.AddRange(typeof(object).GetMembers(BindingFlags.Public | BindingFlags.Instance));
|
||
Type[] types = ctn.GetInterfaces();
|
||
foreach (Type t in types)
|
||
mems.AddRange(t.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy));
|
||
mis = mems.ToArray();
|
||
}
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
{
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method:
|
||
if (!(mi as MethodInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledMethodScope(si2, mi as MethodInfo, this).si, ev);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if (!(mi as FieldInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
AddSymInfoWithAccessCheck(syms, new CompiledFieldScope(si2, mi as FieldInfo, this).si, ev);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledPropertyScope(si2, mi as PropertyInfo, this).si, ev);
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
|
||
AddSymInfoWithAccessCheck(syms, new CompiledEventScope(si2, mi as EventInfo, this).si, ev);
|
||
}
|
||
break;
|
||
}
|
||
|
||
|
||
}
|
||
|
||
if (implemented_interfaces != null && false)
|
||
{
|
||
foreach (TypeScope ts in implemented_interfaces)
|
||
syms.AddRange(ts.GetNamesAsInObject(ev));
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
|
||
private void AddSymInfoWithAccessCheck(List<SymInfo> syms, SymInfo si, ExpressionVisitor ev)
|
||
{
|
||
if (si.acc_mod == access_modifer.protected_modifer)
|
||
{
|
||
if (ev.CheckForBaseAccess(ev.entry_scope, this))
|
||
syms.Add(si);
|
||
}
|
||
else if (si.acc_mod != access_modifer.private_modifer && si.acc_mod != access_modifer.internal_modifer)
|
||
syms.Add(si);
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInBaseClass(ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return syms.ToArray();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||
if (ctn.IsInterface)
|
||
{
|
||
List<MemberInfo> mems = new List<MemberInfo>();
|
||
mems.AddRange(mis);
|
||
mems.AddRange(typeof(object).GetMembers());
|
||
Type[] types = ctn.GetInterfaces();
|
||
foreach (Type t in types)
|
||
mems.AddRange(t.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy));
|
||
mis = mems.ToArray();
|
||
}
|
||
if (!is_static)
|
||
{
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
{
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsSpecialName && ((mi as MethodInfo).IsPublic || (mi as MethodInfo).IsFamily))
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
si2 = new CompiledMethodScope(si2, mi as MethodInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if (!(mi as FieldInfo).IsSpecialName && ((mi as FieldInfo).IsPublic || (mi as FieldInfo).IsFamily))
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
si2 = new CompiledFieldScope(si2, mi as FieldInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Field,mi.Name)); break;
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
PropertyInfo pi = mi as PropertyInfo;
|
||
MethodInfo acc_mi = pi.GetGetMethod(true);
|
||
if (acc_mi != null && (acc_mi.IsPublic || acc_mi.IsFamily))
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
si2 = new CompiledPropertyScope(si2, mi as PropertyInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Property,mi.Name));
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
si2 = new CompiledEventScope(si2, mi as EventInfo, this).si;
|
||
syms.Add(si2);
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Event,mi.Name));
|
||
}
|
||
break;
|
||
case MemberTypes.Constructor:
|
||
if (((mi as ConstructorInfo).IsPublic || (mi as ConstructorInfo).IsFamily))
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
si2 = new CompiledConstructorScope(si2, mi as ConstructorInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
else
|
||
foreach (MemberInfo mi in mis)
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!((mi as MethodInfo).IsSpecialName) && (mi as MethodInfo).IsStatic && (mi as MethodInfo).IsPublic || (mi as MethodInfo).IsFamily)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
si2 = new CompiledMethodScope(si2, mi as MethodInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if ((mi as FieldInfo).IsStatic && !(mi as FieldInfo).IsSpecialName && (mi as FieldInfo).IsPublic || (mi as FieldInfo).IsFamily)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
si2 = new CompiledFieldScope(si2, mi as FieldInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Field,mi.Name)); break;
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
PropertyInfo pi = mi as PropertyInfo;
|
||
MethodInfo acc_mi = pi.GetGetMethod(true);
|
||
if (acc_mi != null && acc_mi.IsStatic && (acc_mi.IsFamily || acc_mi.IsPublic))
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
si2 = new CompiledPropertyScope(si2, mi as PropertyInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Property,mi.Name));
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
si2 = new CompiledEventScope(si2, mi as EventInfo, this).si;
|
||
syms.Add(si2);
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Event,mi.Name));
|
||
}
|
||
break;
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return syms.ToArray();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||
if (ctn.IsInterface)
|
||
{
|
||
List<MemberInfo> mems = new List<MemberInfo>();
|
||
mems.AddRange(mis);
|
||
mems.AddRange(typeof(object).GetMembers());
|
||
Type[] types = ctn.GetInterfaces();
|
||
foreach (Type t in types)
|
||
mems.AddRange(t.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy));
|
||
mis = mems.ToArray();
|
||
}
|
||
if (si.kind != SymbolKind.Type)
|
||
{
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
si2 = new CompiledMethodScope(si2, mi as MethodInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if (!(mi as FieldInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
si2 = new CompiledFieldScope(si2, mi as FieldInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Field,mi.Name)); break;
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
PropertyInfo pi = mi as PropertyInfo;
|
||
MethodInfo acc_mi = pi.GetGetMethod(true);
|
||
if (acc_mi != null && !acc_mi.IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
si2 = new CompiledPropertyScope(si2, mi as PropertyInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Property,mi.Name));
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
MethodInfo acc_mi = (mi as EventInfo).GetAddMethod(true);
|
||
if (acc_mi.IsPublic && !acc_mi.IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
si2 = new CompiledEventScope(si2, mi as EventInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Event,mi.Name));
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
else
|
||
foreach (MemberInfo mi in mis)
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!((mi as MethodInfo).IsSpecialName) && (mi as MethodInfo).IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
si2 = new CompiledMethodScope(si2, mi as MethodInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if ((mi as FieldInfo).IsStatic && !(mi as FieldInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
si2 = new CompiledFieldScope(si2, mi as FieldInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
PropertyInfo pi = mi as PropertyInfo;
|
||
MethodInfo acc_mi = pi.GetGetMethod(true);
|
||
if (acc_mi != null && acc_mi.IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
si2 = new CompiledPropertyScope(si2, mi as PropertyInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
MethodInfo acc_mi = (mi as EventInfo).GetAddMethod(true);
|
||
if (acc_mi.IsPublic && acc_mi.IsStatic)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
si2 = new CompiledEventScope(si2, mi as EventInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Event,mi.Name));
|
||
}
|
||
break;
|
||
}
|
||
|
||
return syms.ToArray();
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
List<SymInfo> syms = new List<SymInfo>();
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return syms.ToArray();
|
||
MemberInfo[] mis = ctn.GetMembers(BindingFlags.Public | BindingFlags.Instance);
|
||
foreach (MemberInfo mi in mis)
|
||
if (!IsHiddenName(mi.Name))
|
||
switch (mi.MemberType)
|
||
{
|
||
case MemberTypes.Method: if (!(mi as MethodInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Method, null);
|
||
si2 = new CompiledMethodScope(si2, mi as MethodInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
break;
|
||
case MemberTypes.Field:
|
||
{
|
||
if (!(mi as FieldInfo).IsSpecialName)
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Field, null);
|
||
if ((mi as FieldInfo).IsLiteral) si2.kind = SymbolKind.Constant;
|
||
si2 = new CompiledFieldScope(si2, mi as FieldInfo, this).si;
|
||
syms.Add(si2);
|
||
}
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Field,mi.Name)); break;
|
||
}
|
||
break;
|
||
case MemberTypes.Property:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Property, null);
|
||
si2 = new CompiledPropertyScope(si2, mi as PropertyInfo, this).si;
|
||
syms.Add(si2);
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Property,mi.Name));
|
||
}
|
||
break;
|
||
case MemberTypes.Event:
|
||
{
|
||
SymInfo si2 = new SymInfo(null, SymbolKind.Event, null);
|
||
si2 = new CompiledEventScope(si2, mi as EventInfo, this).si;
|
||
syms.Add(si2);
|
||
//syms.Add(new SymInfo(mi.Name,SymbolKind.Event,mi.Name));
|
||
}
|
||
break;
|
||
}
|
||
return syms.ToArray();
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return FindName(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return FindOverloadNames(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return FindName(name);
|
||
}
|
||
|
||
private bool HasEnumerable()
|
||
{
|
||
if (ctn == typeof(IEnumerable<>))
|
||
return true;
|
||
if (ctn.IsGenericType && ctn.GetGenericTypeDefinition() == typeof(IEnumerable<>))
|
||
return true;
|
||
if (implemented_interfaces != null)
|
||
foreach (TypeScope t in implemented_interfaces)
|
||
if (t is CompiledScope && (t as CompiledScope).HasEnumerable())
|
||
return true;
|
||
return false;
|
||
}
|
||
public override TypeScope GetElementType()
|
||
{
|
||
if (!is_def_prop_searched)
|
||
get_default_property();
|
||
if (elementType != null)
|
||
return elementType;
|
||
if (HasEnumerable())
|
||
{
|
||
if (instances.Count > 0)
|
||
return instances[0];
|
||
else if (ctn.GetGenericArguments().Length > 0)
|
||
return CompiledScope.get_type_instance(ctn.GetGenericArguments()[0], new List<TypeScope>());
|
||
return elementType;
|
||
}
|
||
return elementType;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
StringComparison comparison = CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
|
||
|
||
List<SymScope> names = new List<SymScope>();
|
||
List<PascalABCCompiler.TreeConverter.SymbolInfo> sil = PascalABCCompiler.NetHelper.NetHelper.FindNameIncludeProtected(ctn, name, CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive);
|
||
//IEnumerable<MemberInfo> ext_meths = PascalABCCompiler.NetHelper.NetHelper.GetExtensionMethods(ctn);
|
||
List<ProcScope> pascal_ext_meths = this.GetExtensionMethods(name, this);
|
||
if (sil != null && sil.Count > 1 && sil.FirstOrDefault().sym_info.semantic_node_type == semantic_node_type.basic_property_node)
|
||
{
|
||
sil.Add(sil.FirstOrDefault());
|
||
sil.RemoveAt(0);
|
||
}
|
||
if (sil == null && names.Count == 0)
|
||
{
|
||
if (name.Equals(StringConstants.default_constructor_name, comparison) && this.ctn != typeof(object))
|
||
sil = PascalABCCompiler.NetHelper.NetHelper.GetConstructor(ctn);
|
||
if (sil == null)
|
||
{
|
||
if (pascal_ext_meths.Count > 0)
|
||
{
|
||
foreach (SymScope ss in pascal_ext_meths)
|
||
names.Add(ss);
|
||
return names;
|
||
}
|
||
if (members != null)
|
||
{
|
||
return base.FindOverloadNames(name);
|
||
}
|
||
else
|
||
return names;
|
||
}
|
||
}
|
||
if (sil.Count > 1 && sil[0].sym_info.semantic_node_type != semantic_node_type.compiled_function_node && sil[0].sym_info.semantic_node_type != semantic_node_type.compiled_constructor_node)
|
||
{
|
||
var si = sil[0];
|
||
sil.Remove(sil[0]);
|
||
sil.Add(si);
|
||
}
|
||
switch (sil.FirstOrDefault().sym_info.semantic_node_type)
|
||
{
|
||
case semantic_node_type.compiled_function_node:
|
||
{
|
||
CompiledMethodScope cms = new CompiledMethodScope(new SymInfo(name, SymbolKind.Method, name), (sil.FirstOrDefault().sym_info as compiled_function_node).method_info, this);
|
||
names.Insert(0, cms);
|
||
sil.RemoveAt(0);
|
||
if (sil.Count() == 0)
|
||
sil = null;
|
||
CompiledMethodScope tmp = cms;
|
||
SortedDictionary<int, List<CompiledMethodScope>> meths = new SortedDictionary<int, List<CompiledMethodScope>>();
|
||
if (cms.acc_mod != access_modifer.internal_modifer && cms.acc_mod != access_modifer.private_modifer)
|
||
{
|
||
int par_num = cms.mi.GetParameters().Length;
|
||
meths[par_num] = new List<CompiledMethodScope>();
|
||
meths[par_num].Add(cms);
|
||
}
|
||
if (sil != null) {
|
||
foreach (var si in sil)
|
||
{
|
||
if (si.access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && si.access_level != PascalABCCompiler.TreeConverter.access_level.al_private && si.sym_info.semantic_node_type == semantic_node_type.compiled_function_node)
|
||
{
|
||
tmp = new CompiledMethodScope(new SymInfo(name, SymbolKind.Method, name), (si.sym_info as compiled_function_node).method_info, this);
|
||
names.Insert(0, tmp);
|
||
//tmp.nextProc = cms;
|
||
//cms = tmp;
|
||
int par_num = tmp.mi.GetParameters().Length;
|
||
if (!meths.ContainsKey(par_num)) meths[par_num] = new List<CompiledMethodScope>();
|
||
meths[par_num].Add(tmp);
|
||
}
|
||
}
|
||
}
|
||
bool beg = false;
|
||
tmp = null;
|
||
cms = null;
|
||
foreach (List<CompiledMethodScope> lst in meths.Values)
|
||
{
|
||
foreach (CompiledMethodScope m in lst)
|
||
{
|
||
if (beg == false)
|
||
{
|
||
tmp = m;
|
||
cms = tmp;
|
||
beg = true;
|
||
}
|
||
else
|
||
{
|
||
tmp.nextProc = m;
|
||
tmp = tmp.nextProc as CompiledMethodScope;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case semantic_node_type.compiled_constructor_node:
|
||
{
|
||
CompiledConstructorScope cms = new CompiledConstructorScope(new SymInfo(StringConstants.default_constructor_name, SymbolKind.Method, StringConstants.default_constructor_name), (sil.FirstOrDefault().sym_info as compiled_constructor_node).constructor_info, this);
|
||
names.Insert(0, cms);
|
||
sil.RemoveAt(0);
|
||
if(sil.Count() == 0)
|
||
sil = null;
|
||
CompiledConstructorScope tmp = cms;
|
||
SortedDictionary<int, List<CompiledConstructorScope>> meths = new SortedDictionary<int, List<CompiledConstructorScope>>();
|
||
if (cms.acc_mod != access_modifer.internal_modifer && cms.acc_mod != access_modifer.private_modifer)
|
||
{
|
||
int par_num = cms.mi.GetParameters().Length;
|
||
meths[par_num] = new List<CompiledConstructorScope>();
|
||
meths[par_num].Add(cms);
|
||
}
|
||
if (sil != null)
|
||
{
|
||
foreach (var si in sil)
|
||
{
|
||
if (si.access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && si.access_level != PascalABCCompiler.TreeConverter.access_level.al_private && si.sym_info.semantic_node_type == semantic_node_type.compiled_constructor_node)
|
||
{
|
||
tmp = new CompiledConstructorScope(new SymInfo(StringConstants.default_constructor_name, SymbolKind.Method, StringConstants.default_constructor_name), (si.sym_info as compiled_constructor_node).constructor_info, this);
|
||
//tmp.nextProc = cms;
|
||
//cms = tmp;
|
||
names.Insert(0, tmp);
|
||
int par_num = tmp.mi.GetParameters().Length;
|
||
if (!meths.ContainsKey(par_num)) meths[par_num] = new List<CompiledConstructorScope>();
|
||
meths[par_num].Add(tmp);
|
||
}
|
||
}
|
||
}
|
||
bool beg = false;
|
||
tmp = null;
|
||
cms = null;
|
||
foreach (List<CompiledConstructorScope> lst in meths.Values)
|
||
{
|
||
foreach (CompiledConstructorScope m in lst)
|
||
{
|
||
if (beg == false)
|
||
{
|
||
tmp = m;
|
||
cms = tmp;
|
||
beg = true;
|
||
}
|
||
else
|
||
{
|
||
tmp.nextProc = m;
|
||
tmp = tmp.nextProc as CompiledConstructorScope;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case semantic_node_type.compiled_variable_definition:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
names.Add(new CompiledFieldScope(new SymInfo(name, SymbolKind.Field, name), (sil.FirstOrDefault().sym_info as compiled_variable_definition).compiled_field, this));
|
||
break;
|
||
case semantic_node_type.basic_property_node:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
names.Add(new CompiledPropertyScope(new SymInfo(name, SymbolKind.Property, name), (sil.FirstOrDefault().sym_info as compiled_property_node).property_info, this));
|
||
break;
|
||
case semantic_node_type.compiled_class_constant_definition:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
names.Add(new CompiledFieldScope(new SymInfo(name, SymbolKind.Constant, name), (sil.FirstOrDefault().sym_info as compiled_class_constant_definition).field, this));
|
||
break;
|
||
case semantic_node_type.compiled_event:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
names.Add(new CompiledEventScope(new SymInfo(name, SymbolKind.Constant, name), (sil.FirstOrDefault().sym_info as compiled_event).event_info, this));
|
||
break;
|
||
//case semantic_node_type.compiled_event: return new CompiledScope(null,(si.sym_info as compiled_event).event_info.);
|
||
//case semantic_node_type.compiled_event: return new CompiledScope(null,(si.sym_info as compiled_event).
|
||
}
|
||
|
||
return names;
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
StringComparison comparison = CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
|
||
|
||
List<PascalABCCompiler.TreeConverter.SymbolInfo> sil = PascalABCCompiler.NetHelper.NetHelper.FindNameIncludeProtected(ctn, name, CodeCompletionController.CurrentParser.LanguageInformation.CaseSensitive);
|
||
if (!CodeCompletionController.CurrentParser.LanguageInformation.IncludeDotNetEntities)
|
||
return null;
|
||
if (sil == null)
|
||
{
|
||
if (name.Equals(StringConstants.default_constructor_name, comparison))
|
||
sil = PascalABCCompiler.NetHelper.NetHelper.GetConstructor(ctn);
|
||
if (sil == null)
|
||
{
|
||
return null;
|
||
}
|
||
}
|
||
switch (sil.FirstOrDefault().sym_info.semantic_node_type)
|
||
{
|
||
case semantic_node_type.compiled_function_node:
|
||
{
|
||
CompiledMethodScope cms = new CompiledMethodScope(new SymInfo(name, SymbolKind.Method, name), (sil.FirstOrDefault().sym_info as compiled_function_node).method_info, this);
|
||
sil.RemoveAt(0);
|
||
if (sil.Count() == 0)
|
||
sil = null;
|
||
CompiledMethodScope tmp = cms;
|
||
SortedDictionary<int, List<CompiledMethodScope>> meths = new SortedDictionary<int, List<CompiledMethodScope>>();
|
||
if (cms.acc_mod != access_modifer.internal_modifer && cms.acc_mod != access_modifer.private_modifer)
|
||
{
|
||
int par_num = cms.mi.GetParameters().Length;
|
||
meths[par_num] = new List<CompiledMethodScope>();
|
||
meths[par_num].Add(cms);
|
||
}
|
||
if (sil != null)
|
||
{
|
||
foreach (var si in sil)
|
||
{
|
||
if (si.access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && si.access_level != PascalABCCompiler.TreeConverter.access_level.al_private && si.sym_info.semantic_node_type == semantic_node_type.compiled_function_node)
|
||
{
|
||
tmp = new CompiledMethodScope(new SymInfo(name, SymbolKind.Method, name), (si.sym_info as compiled_function_node).method_info, this);
|
||
//tmp.nextProc = cms;
|
||
//cms = tmp;
|
||
int par_num = tmp.mi.GetParameters().Length;
|
||
if (!meths.ContainsKey(par_num)) meths[par_num] = new List<CompiledMethodScope>();
|
||
meths[par_num].Add(tmp);
|
||
}
|
||
else if (si.access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && si.access_level != PascalABCCompiler.TreeConverter.access_level.al_private && si.sym_info is compiled_property_node)
|
||
{
|
||
return new CompiledPropertyScope(new SymInfo(name, SymbolKind.Property, name), (si.sym_info as compiled_property_node).property_info, this);
|
||
}
|
||
}
|
||
}
|
||
bool beg = false;
|
||
tmp = null;
|
||
cms = null;
|
||
foreach (List<CompiledMethodScope> lst in meths.Values)
|
||
{
|
||
foreach (CompiledMethodScope m in lst)
|
||
{
|
||
if (beg == false)
|
||
{
|
||
tmp = m;
|
||
cms = tmp;
|
||
beg = true;
|
||
}
|
||
else
|
||
{
|
||
tmp.nextProc = m;
|
||
tmp = tmp.nextProc as CompiledMethodScope;
|
||
}
|
||
}
|
||
}
|
||
return cms;
|
||
}
|
||
case semantic_node_type.compiled_constructor_node:
|
||
{
|
||
CompiledConstructorScope cms = new CompiledConstructorScope(new SymInfo(StringConstants.default_constructor_name, SymbolKind.Method, StringConstants.default_constructor_name), (sil.FirstOrDefault().sym_info as compiled_constructor_node).constructor_info, this);
|
||
sil.RemoveAt(0);
|
||
if (sil.Count() == 0)
|
||
sil = null;
|
||
CompiledConstructorScope tmp = cms;
|
||
SortedDictionary<int, List<CompiledConstructorScope>> meths = new SortedDictionary<int, List<CompiledConstructorScope>>();
|
||
if (cms.acc_mod != access_modifer.internal_modifer && cms.acc_mod != access_modifer.private_modifer)
|
||
{
|
||
int par_num = cms.mi.GetParameters().Length;
|
||
meths[par_num] = new List<CompiledConstructorScope>();
|
||
meths[par_num].Add(cms);
|
||
}
|
||
if (sil != null)
|
||
{
|
||
foreach (var si in sil)
|
||
{
|
||
if (si.access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && si.access_level != PascalABCCompiler.TreeConverter.access_level.al_private && si.sym_info.semantic_node_type == semantic_node_type.compiled_constructor_node)
|
||
{
|
||
tmp = new CompiledConstructorScope(new SymInfo(StringConstants.default_constructor_name, SymbolKind.Method, StringConstants.default_constructor_name), (si.sym_info as compiled_constructor_node).constructor_info, this);
|
||
//tmp.nextProc = cms;
|
||
//cms = tmp;
|
||
int par_num = tmp.mi.GetParameters().Length;
|
||
if (!meths.ContainsKey(par_num)) meths[par_num] = new List<CompiledConstructorScope>();
|
||
meths[par_num].Add(tmp);
|
||
}
|
||
}
|
||
}
|
||
bool beg = false;
|
||
tmp = null;
|
||
cms = null;
|
||
foreach (List<CompiledConstructorScope> lst in meths.Values)
|
||
{
|
||
foreach (CompiledConstructorScope m in lst)
|
||
{
|
||
if (beg == false)
|
||
{
|
||
tmp = m;
|
||
cms = tmp;
|
||
beg = true;
|
||
}
|
||
else
|
||
{
|
||
tmp.nextProc = m;
|
||
tmp = tmp.nextProc as CompiledConstructorScope;
|
||
}
|
||
}
|
||
}
|
||
return cms;
|
||
}
|
||
case semantic_node_type.compiled_variable_definition:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
return new CompiledFieldScope(new SymInfo(name, SymbolKind.Field, name), (sil.FirstOrDefault().sym_info as compiled_variable_definition).compiled_field, this);
|
||
break;
|
||
case semantic_node_type.basic_property_node:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
return new CompiledPropertyScope(new SymInfo(name, SymbolKind.Property, name), (sil.FirstOrDefault().sym_info as compiled_property_node).property_info, this);
|
||
break;
|
||
case semantic_node_type.compiled_class_constant_definition:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
return new CompiledFieldScope(new SymInfo(name, SymbolKind.Constant, name), (sil.FirstOrDefault().sym_info as compiled_class_constant_definition).field, this);
|
||
break;
|
||
case semantic_node_type.compiled_event:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private)
|
||
return new CompiledEventScope(new SymInfo(name, SymbolKind.Constant, name), (sil.FirstOrDefault().sym_info as compiled_event).event_info, this);
|
||
break;
|
||
case semantic_node_type.compiled_type_node:
|
||
if (sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_internal && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_private && sil.FirstOrDefault().access_level != PascalABCCompiler.TreeConverter.access_level.al_protected)
|
||
return TypeTable.get_compiled_type(new SymInfo(name, SymbolKind.Type, name), (sil.FirstOrDefault().sym_info as compiled_type_node).compiled_type);
|
||
break;
|
||
//case semantic_node_type.compiled_event: return new CompiledScope(null,(si.sym_info as compiled_event).event_info.);
|
||
//case semantic_node_type.compiled_event: return new CompiledScope(null,(si.sym_info as compiled_event).
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetFullTypeName(this);
|
||
}
|
||
}
|
||
|
||
public class CompiledFieldScope : ElementScope, ICompiledFieldScope
|
||
{
|
||
public FieldInfo fi;
|
||
public bool is_global;
|
||
public List<string> generic_args;
|
||
|
||
public CompiledFieldScope(SymInfo si, FieldInfo fi, CompiledScope declaringType)
|
||
{
|
||
this.si = si;
|
||
this.fi = fi;
|
||
string[] args = declaringType.TemplateArguments;
|
||
if (args != null)
|
||
{
|
||
generic_args = new List<string>();
|
||
generic_args.AddRange(args);
|
||
}
|
||
if (generic_args != null)
|
||
{
|
||
//TypeScope ts = declaringType.instances[fi.FieldType.GenericParameterPosition];
|
||
this.sc = CompiledScope.get_type_instance(fi.FieldType, declaringType.instances);
|
||
}
|
||
else
|
||
this.sc = TypeTable.get_compiled_type(fi.FieldType);
|
||
if (fi.IsLiteral)
|
||
this.cnst_val = fi.GetRawConstantValue();
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, fi);
|
||
this.si.name = fi.Name;
|
||
this.si.description = this.ToString();
|
||
//this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(fi.DeclaringType.Assembly,"F:"+fi.DeclaringType.FullName+"."+fi.Name);
|
||
this.topScope = declaringType;
|
||
if (fi.IsPrivate)
|
||
{
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (fi.IsFamily || fi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (fi.IsFamilyAndAssembly || fi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
}
|
||
|
||
public CompiledFieldScope(SymInfo si, FieldInfo fi, CompiledScope declaringType, bool is_global)
|
||
{
|
||
this.si = si;
|
||
this.fi = fi;
|
||
string[] args = declaringType.TemplateArguments;
|
||
if (args != null)
|
||
{
|
||
generic_args = new List<string>();
|
||
generic_args.AddRange(args);
|
||
}
|
||
if (generic_args != null)
|
||
{
|
||
//TypeScope ts = declaringType.instances[fi.FieldType.GenericParameterPosition];
|
||
this.sc = CompiledScope.get_type_instance(fi.FieldType, declaringType.instances);
|
||
}
|
||
else
|
||
this.sc = TypeTable.get_compiled_type(fi.FieldType);
|
||
if (fi.IsLiteral)
|
||
this.cnst_val = fi.GetRawConstantValue();
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, fi);
|
||
this.si.name = fi.Name;
|
||
this.is_global = is_global;
|
||
this.si.description = this.ToString();
|
||
//this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(fi.DeclaringType.Assembly,"F:"+fi.DeclaringType.FullName+"."+fi.Name);
|
||
this.topScope = declaringType;
|
||
if (fi.IsPrivate)
|
||
{
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (fi.IsFamily || fi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (fi.IsFamilyAndAssembly || fi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.CompiledField;
|
||
}
|
||
}
|
||
|
||
public bool IsGlobal
|
||
{
|
||
get
|
||
{
|
||
return is_global;
|
||
}
|
||
}
|
||
|
||
public List<string> GenericArgs
|
||
{
|
||
get
|
||
{
|
||
return generic_args;
|
||
}
|
||
}
|
||
|
||
public FieldInfo CompiledField
|
||
{
|
||
get
|
||
{
|
||
return fi;
|
||
}
|
||
}
|
||
|
||
public override bool IsReadOnly
|
||
{
|
||
get { return fi.IsInitOnly; }
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is CompiledFieldScope && (ts as CompiledFieldScope).fi == this.fi) return true;
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
public class CompiledEventScope : ElementScope, ICompiledEventScope
|
||
{
|
||
public EventInfo ei;
|
||
public List<string> generic_args;
|
||
|
||
public CompiledEventScope(SymInfo si, EventInfo ei, CompiledScope declaringType)
|
||
{
|
||
this.si = si;
|
||
this.ei = ei;
|
||
string[] args = declaringType.TemplateArguments;
|
||
if (args != null)
|
||
{
|
||
generic_args = new List<string>();
|
||
generic_args.AddRange(args);
|
||
}
|
||
if (generic_args != null)
|
||
{
|
||
//TypeScope ts = declaringType.instances[ei.EventHandlerType.GenericParameterPosition];
|
||
this.sc = CompiledScope.get_type_instance(ei.EventHandlerType, declaringType.instances);
|
||
}
|
||
else
|
||
this.sc = TypeTable.get_compiled_type(ei.EventHandlerType);
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, ei);
|
||
this.si.name = ei.Name;
|
||
this.si.description = this.ToString();
|
||
this.topScope = declaringType;
|
||
MethodInfo acc_mi = ei.GetAddMethod(true);
|
||
is_static = acc_mi.IsStatic;
|
||
if (acc_mi.IsPrivate)
|
||
{
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (acc_mi.IsFamily || acc_mi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (acc_mi.IsFamilyAndAssembly || acc_mi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
//this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(ei.DeclaringType.Assembly,"E:"+ei.DeclaringType.FullName+"."+ei.Name);
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.CompiledEvent;
|
||
}
|
||
}
|
||
|
||
public List<string> GenericArgs
|
||
{
|
||
get
|
||
{
|
||
return generic_args;
|
||
}
|
||
}
|
||
|
||
public override bool IsStatic
|
||
{
|
||
get
|
||
{
|
||
return is_static;
|
||
}
|
||
}
|
||
|
||
public EventInfo CompiledEvent
|
||
{
|
||
get
|
||
{
|
||
return ei;
|
||
}
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is CompiledEventScope && (ts as CompiledEventScope).ei == this.ei) return true;
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
//return "event "+ TypeUtility.GetShortTypeName(ei.DeclaringType) +"."+ ei.Name + ": "+sc.ToString();
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
public class CompiledPropertyScope : ElementScope, ICompiledPropertyScope
|
||
{
|
||
public PropertyInfo pi;
|
||
public List<string> generic_args;
|
||
|
||
public CompiledPropertyScope(SymInfo si, PropertyInfo pi, CompiledScope declaringType)
|
||
{
|
||
this.si = si;
|
||
this.pi = pi;
|
||
string[] args = declaringType.TemplateArguments;
|
||
if (args != null)
|
||
{
|
||
generic_args = new List<string>();
|
||
generic_args.AddRange(args);
|
||
}
|
||
if (generic_args != null || declaringType.instances != null )
|
||
{
|
||
//TypeScope ts = declaringType.instances[pi.PropertyType.GenericParameterPosition];
|
||
this.sc = CompiledScope.get_type_instance(pi.PropertyType, declaringType.instances);
|
||
}
|
||
else
|
||
this.sc = TypeTable.get_compiled_type(pi.PropertyType);
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, pi);
|
||
this.si.name = pi.Name;
|
||
this.topScope = declaringType;
|
||
//this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(pi.DeclaringType.Assembly,"P:"+pi.DeclaringType.FullName+"."+pi.Name);
|
||
MethodInfo acc_mi = PascalABCCompiler.NetHelper.NetHelper.GetAnyAccessor(pi);
|
||
if (acc_mi != null && acc_mi == pi.GetGetMethod(true))
|
||
{
|
||
ParameterInfo[] prms = acc_mi.GetParameters();
|
||
if (prms.Length > 0)
|
||
{
|
||
indexers = new List<TypeScope>();
|
||
foreach (ParameterInfo p in prms)
|
||
{
|
||
indexers.Add(TypeTable.get_compiled_type(p.ParameterType));
|
||
}
|
||
Type ret_type = acc_mi.ReturnType;
|
||
elementType = TypeTable.get_compiled_type(ret_type);
|
||
}
|
||
}
|
||
if (acc_mi != null)
|
||
if (acc_mi.IsPrivate)
|
||
{
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (acc_mi.IsFamily || acc_mi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (acc_mi.IsFamilyAndAssembly || acc_mi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
this.si.description = this.ToString();
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.CompiledProperty;
|
||
}
|
||
}
|
||
|
||
public List<string> GenericArgs
|
||
{
|
||
get
|
||
{
|
||
return generic_args;
|
||
}
|
||
}
|
||
|
||
public PropertyInfo CompiledProperty
|
||
{
|
||
get
|
||
{
|
||
return pi;
|
||
}
|
||
}
|
||
|
||
public override bool IsReadOnly
|
||
{
|
||
get { return pi.GetSetMethod(true) == null; }
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
if (ts is CompiledPropertyScope && (ts as CompiledPropertyScope).pi == this.pi) return true;
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
public class CompiledParameterScope : ElementScope
|
||
{
|
||
private ParameterInfo pi;
|
||
|
||
public CompiledParameterScope(SymInfo si, ParameterInfo pi)
|
||
{
|
||
this.si = si;
|
||
this.pi = pi;
|
||
this.sc = TypeTable.get_compiled_type(pi.ParameterType);
|
||
if (pi.ParameterType.IsByRef)
|
||
this.param_kind = parametr_kind.var_parametr;
|
||
else if (is_params(pi))
|
||
this.param_kind = parametr_kind.params_parametr;
|
||
if (pi.IsOptional)
|
||
this.cnst_val = pi.DefaultValue;
|
||
//MakeDescription();
|
||
}
|
||
|
||
private bool is_params(ParameterInfo _par)
|
||
{
|
||
object[] objarr = _par.GetCustomAttributes(typeof(ParamArrayAttribute), true);
|
||
if ((objarr == null) || (objarr.Length == 0))
|
||
{
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
}
|
||
|
||
public class CompiledMethodScope : ProcScope, ICompiledMethodScope
|
||
{
|
||
public MethodInfo mi;
|
||
public bool is_global;
|
||
//private CompiledScope ret_type;
|
||
|
||
|
||
public CompiledMethodScope(SymInfo si, MethodInfo mi, TypeScope declaringType)
|
||
{
|
||
this.si = si;
|
||
this.mi = mi;
|
||
if (declaringType == TypeTable.string_type && mi.GetParameters().Length >= 1 && mi.GetParameters()[0].ParameterType.Name == "IEnumerable`1")
|
||
{
|
||
List<TypeScope> type_list = new List<TypeScope>();
|
||
type_list.Add(TypeTable.char_type);
|
||
declaringType = TypeTable.get_compiled_type(mi.GetParameters()[0].ParameterType.GetGenericTypeDefinition()).GetInstance(type_list);
|
||
}
|
||
string[] args = declaringType.TemplateArguments;
|
||
this.declaringType = declaringType;
|
||
if (args != null)
|
||
{
|
||
generic_args = new List<string>();
|
||
generic_args.AddRange(args);
|
||
}
|
||
if (mi.GetGenericArguments().Length > 0)
|
||
{
|
||
this.template_parameters = new List<string>();
|
||
foreach (Type t in mi.GetGenericArguments())
|
||
this.template_parameters.Add(t.Name);
|
||
}
|
||
if (mi.ReturnType != typeof(void))
|
||
{
|
||
if (generic_args != null)
|
||
{
|
||
this.return_type = CompiledScope.get_type_instance(mi.ReturnType, declaringType.instances);
|
||
}
|
||
else
|
||
return_type = TypeTable.get_compiled_type(mi.ReturnType);
|
||
}
|
||
parameters = new List<ElementScope>();
|
||
int i = 0;
|
||
is_extension = PascalABCCompiler.NetHelper.NetHelper.IsExtensionMethod(mi);
|
||
foreach (ParameterInfo pi in mi.GetParameters())
|
||
{
|
||
parameters.Add(new CompiledParameterScope(new SymInfo(pi.Name, SymbolKind.Parameter, pi.Name), pi));
|
||
}
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, mi);
|
||
this.si.name = CodeCompletionController.CurrentParser.LanguageInformation.GetShortName(this);
|
||
this.si.description = this.ToString();
|
||
//this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(mi.DeclaringType.Assembly,"M:"+mi.DeclaringType.FullName+"."+mi.Name+GetParamNames());
|
||
this.topScope = declaringType;
|
||
if (mi.IsPrivate)
|
||
{
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (mi.IsFamily || mi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (mi.IsFamilyAndAssembly || mi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
is_constructor = mi.IsConstructor;
|
||
}
|
||
|
||
public CompiledMethodScope(SymInfo si, MethodInfo mi, CompiledScope declaringType, bool is_global)
|
||
{
|
||
this.si = si;
|
||
this.mi = mi;
|
||
this.declaringType = declaringType;
|
||
string[] args = declaringType.TemplateArguments;
|
||
if (args != null)
|
||
{
|
||
generic_args = new List<string>();
|
||
generic_args.AddRange(args);
|
||
}
|
||
if (mi.ReturnType != typeof(void))
|
||
return_type = TypeTable.get_compiled_type(mi.ReturnType);
|
||
parameters = new List<ElementScope>();
|
||
int i = 0;
|
||
is_extension = PascalABCCompiler.NetHelper.NetHelper.IsExtensionMethod(mi);
|
||
foreach (ParameterInfo pi in mi.GetParameters())
|
||
{
|
||
parameters.Add(new CompiledParameterScope(new SymInfo(pi.Name, SymbolKind.Parameter, pi.Name), pi));
|
||
}
|
||
this.is_global = is_global;
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, mi);
|
||
this.si.name = CodeCompletionController.CurrentParser.LanguageInformation.GetShortName(this);
|
||
this.si.description = this.ToString();
|
||
//this.si.describe += "\n"+AssemblyDocCache.GetDocumentation(mi.DeclaringType.Assembly,"M:"+mi.DeclaringType.FullName+"."+mi.Name+GetParamNames());
|
||
this.topScope = declaringType;
|
||
if (mi.IsPrivate)
|
||
{
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (mi.IsFamily || mi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (mi.IsFamilyAndAssembly || mi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
is_constructor = mi.IsConstructor;
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.CompiledMethod;
|
||
}
|
||
}
|
||
|
||
public List<string> GenericArgs
|
||
{
|
||
get
|
||
{
|
||
return generic_args;
|
||
}
|
||
}
|
||
|
||
public bool IsGlobal
|
||
{
|
||
get
|
||
{
|
||
return is_global;
|
||
}
|
||
}
|
||
|
||
public override string Name
|
||
{
|
||
get { return mi.Name; }
|
||
}
|
||
|
||
public MethodInfo CompiledMethod
|
||
{
|
||
get
|
||
{
|
||
return mi;
|
||
}
|
||
}
|
||
|
||
public override bool IsAbstract
|
||
{
|
||
get { return mi.IsAbstract && !mi.DeclaringType.IsInterface; }
|
||
}
|
||
|
||
public override bool IsStatic
|
||
{
|
||
get { return mi.IsStatic && !is_extension; }
|
||
}
|
||
|
||
public override bool IsVirtual
|
||
{
|
||
get { return mi.IsVirtual && !mi.IsFinal; }
|
||
}
|
||
|
||
public override bool IsConstructor()
|
||
{
|
||
return mi.IsConstructor;
|
||
}
|
||
|
||
public override int GetParametersCount()
|
||
{
|
||
return mi.GetParameters().Length;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
if (return_type != null)
|
||
return return_type.GetNames();
|
||
else
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// return return_type.GetNames();
|
||
// }
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
if (return_type != null)
|
||
return return_type.FindName(name);
|
||
else
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return FindName(name);
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
CompiledMethodScope cms = ts as CompiledMethodScope;
|
||
if (cms == null) return false;
|
||
if (cms.mi == this.mi) return true;
|
||
if (cms.nextProc != null) return IsEqual(cms.nextProc);
|
||
return false;
|
||
}
|
||
|
||
public override bool IsParamsEquals(ProcScope ps)
|
||
{
|
||
if (ps is CompiledMethodScope || ps is CompiledConstructorScope)
|
||
return false;
|
||
try
|
||
{
|
||
ParameterInfo[] prms = this.mi.GetParameters();
|
||
if (ps.parameters == null)
|
||
{
|
||
if (prms.Length != 0) return false;
|
||
if (ps.return_type == null)
|
||
{
|
||
if (this.mi.ReturnType == typeof(void))
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
if (this.mi.ReturnType == null)
|
||
return false;
|
||
return ps.return_type.IsEqual(TypeTable.get_compiled_type(this.mi.ReturnType));
|
||
}
|
||
if (prms.Length != ps.parameters.Count)
|
||
return false;
|
||
for (int i = 0; i < prms.Length; i++)
|
||
{
|
||
if (!ps.parameters[i].sc.IsEqual(TypeTable.get_compiled_type(prms[i].ParameterType)))
|
||
return false;
|
||
}
|
||
if (ps.return_type == null)
|
||
{
|
||
if (this.mi.ReturnType == typeof(void))
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
if (this.mi.ReturnType == null)
|
||
return false;
|
||
return ps.return_type.IsEqual(TypeTable.get_compiled_type(this.mi.ReturnType));
|
||
}
|
||
catch
|
||
{
|
||
return false;
|
||
}
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
public class CompiledConstructorScope : ProcScope, ICompiledConstructorScope
|
||
{
|
||
public ConstructorInfo mi;
|
||
//private CompiledScope ret_type;
|
||
|
||
public override bool IsConstructor()
|
||
{
|
||
return true;
|
||
}
|
||
|
||
public CompiledConstructorScope(SymInfo si, ConstructorInfo mi, CompiledScope declaringType)
|
||
{
|
||
this.si = si;
|
||
this.mi = mi;
|
||
//if (mi.ReturnType != typeof(void))
|
||
return_type = TypeTable.get_compiled_type(mi.DeclaringType);
|
||
if (si.name == null)
|
||
AssemblyDocCache.AddDescribeToComplete(this.si, mi);
|
||
|
||
parameters = new List<ElementScope>();
|
||
foreach (ParameterInfo pi in mi.GetParameters())
|
||
parameters.Add(new CompiledParameterScope(new SymInfo(pi.Name, SymbolKind.Parameter, pi.Name), pi));
|
||
|
||
this.si.name = CodeCompletionController.CurrentParser.LanguageInformation.GetShortName(this);
|
||
this.si.description = this.ToString();//+"\n"+AssemblyDocCache.GetDocumentation(mi.DeclaringType.Assembly,"M:"+mi.DeclaringType.FullName+".#ctor"+GetParamNames());
|
||
this.topScope = declaringType;
|
||
if (mi.IsPrivate)
|
||
{
|
||
this.si.acc_mod = access_modifer.private_modifer;
|
||
this.acc_mod = access_modifer.private_modifer;
|
||
}
|
||
else if (mi.IsFamily || mi.IsFamilyOrAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.protected_modifer;
|
||
this.si.acc_mod = access_modifer.protected_modifer;
|
||
}
|
||
else if (mi.IsFamilyAndAssembly || mi.IsAssembly)
|
||
{
|
||
this.acc_mod = access_modifer.internal_modifer;
|
||
this.si.acc_mod = access_modifer.internal_modifer;
|
||
}
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.CompiledConstructor;
|
||
}
|
||
}
|
||
|
||
public ConstructorInfo CompiledConstructor
|
||
{
|
||
get
|
||
{
|
||
return mi;
|
||
}
|
||
}
|
||
|
||
public IBaseScope Type
|
||
{
|
||
get
|
||
{
|
||
throw new NotImplementedException();
|
||
}
|
||
}
|
||
|
||
public override int GetParametersCount()
|
||
{
|
||
return mi.GetParameters().Length;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
return return_type.GetNames();
|
||
}
|
||
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// return return_type.GetNames();
|
||
// }
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
return return_type.FindName(name);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return FindName(name);
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
CompiledConstructorScope cms = ts as CompiledConstructorScope;
|
||
if (cms == null) return false;
|
||
if (cms.mi == this.mi) return true;
|
||
if (cms.nextProc != null) return IsEqual(cms.nextProc);
|
||
return false;
|
||
}
|
||
|
||
public override bool IsParamsEquals(ProcScope ps)
|
||
{
|
||
if (ps is CompiledMethodScope || ps is CompiledConstructorScope)
|
||
return false;
|
||
if ((ps.parameters == null || ps.parameters.Count == 0) && this.mi.GetParameters().Length == 0)
|
||
return true;
|
||
return false;
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return CodeCompletionController.CurrentParser.LanguageInformation.GetDescription(this);
|
||
}
|
||
}
|
||
|
||
public class WithScope : SymScope
|
||
{
|
||
class TypeScopeDesc
|
||
{
|
||
public SymScope ss;
|
||
public bool is_type;
|
||
|
||
public TypeScopeDesc(SymScope ss, bool is_type)
|
||
{
|
||
this.ss = ss;
|
||
this.is_type = is_type;
|
||
}
|
||
}
|
||
|
||
private List<TypeScopeDesc> with_scopes = new List<TypeScopeDesc>();
|
||
|
||
public WithScope(SymScope topScope)
|
||
{
|
||
this.topScope = topScope;
|
||
this.si = new SymInfo("$with_block", SymbolKind.Block, "$with_block");
|
||
}
|
||
|
||
public void AddWithScope(SymScope ss, bool is_type)
|
||
{
|
||
with_scopes.Add(new TypeScopeDesc(ss, is_type));
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
for (int i = 0; i < with_scopes.Count; i++)
|
||
{
|
||
SymScope ss = with_scopes[i].ss.FindNameOnlyInType(name);
|
||
if (ss != null) return ss;
|
||
}
|
||
return topScope.FindNameInAnyOrder(name);
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
for (int i = 0; i < with_scopes.Count; i++)
|
||
{
|
||
lst.AddRange(with_scopes[i].ss.GetNamesAsInObject());
|
||
}
|
||
lst.AddRange(topScope.GetNames());
|
||
return lst.ToArray();
|
||
}
|
||
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// List<SymInfo> lst = new List<SymInfo>();
|
||
// for (int i=0; i<with_scopes.Count; i++)
|
||
// {
|
||
// if (!with_scopes[i].is_type)
|
||
// lst.AddRange(with_scopes[i].ss.GetNamesAsInObject(ev));
|
||
// else
|
||
// lst.AddRange((with_scopes[i].ss as TypeScope).GetNames(ev,PascalABCCompiler.Parsers.KeywordKind.None));
|
||
// }
|
||
// lst.AddRange(topScope.GetNames(ev));
|
||
// return lst.ToArray();
|
||
// }
|
||
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
List<SymInfo> lst = new List<SymInfo>();
|
||
for (int i = 0; i < with_scopes.Count; i++)
|
||
{
|
||
if (!with_scopes[i].is_type)
|
||
lst.AddRange(with_scopes[i].ss.GetNamesAsInObject(ev));
|
||
else
|
||
lst.AddRange((with_scopes[i].ss as TypeScope).GetNames(ev, PascalABCCompiler.Parsers.KeywordKind.None, false));
|
||
}
|
||
lst.AddRange(topScope.GetNamesInAllTopScopes(all_names, ev, is_static));
|
||
return lst.ToArray();
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
for (int i = 0; i < with_scopes.Count; i++)
|
||
{
|
||
SymScope ss = with_scopes[i].ss.FindNameOnlyInType(name);
|
||
if (ss != null) return ss;
|
||
}
|
||
return topScope.FindName(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
List<SymScope> names = new List<SymScope>();
|
||
for (int i = 0; i < with_scopes.Count; i++)
|
||
{
|
||
names.AddRange(with_scopes[i].ss.FindOverloadNamesOnlyInType(name));
|
||
}
|
||
names.AddRange(topScope.FindOverloadNames(name));
|
||
return names;
|
||
}
|
||
|
||
public override void AddName(string name, SymScope sc)
|
||
{
|
||
if (members == null) members = new List<SymScope>();
|
||
base.AddName(name, sc);
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return FindName(name);
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return FindOverloadNames(name);
|
||
}
|
||
}
|
||
|
||
public class BlockScope : SymScope, IBlockScope
|
||
{
|
||
public BlockScope(SymScope topScope)
|
||
{
|
||
this.topScope = topScope;
|
||
this.si = new SymInfo("$block_scope", SymbolKind.Block, "$block_scope");
|
||
this.members = new List<SymScope>();
|
||
}
|
||
|
||
public override ScopeKind Kind
|
||
{
|
||
get
|
||
{
|
||
return ScopeKind.Block;
|
||
}
|
||
}
|
||
}
|
||
|
||
public class UnknownScope : TypeScope
|
||
{
|
||
public UnknownScope(SymInfo si)
|
||
{
|
||
this.si = si;
|
||
this.name = si.name;
|
||
}
|
||
|
||
public override bool IsEqual(SymScope ts)
|
||
{
|
||
return ts != null && string.Compare(this.si.name, ts.si.name, true) == 0;
|
||
}
|
||
|
||
public override SymScope FindName(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNames(string name)
|
||
{
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override TypeScope GetInstance(List<TypeScope> gen_args, bool exact = false)
|
||
{
|
||
if (gen_args.Count > 0)
|
||
return gen_args[0];
|
||
return this;
|
||
}
|
||
|
||
public override List<SymScope> FindOverloadNamesOnlyInType(string name)
|
||
{
|
||
return new List<SymScope>(0);
|
||
}
|
||
|
||
public override SymScope FindNameInAnyOrder(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInThisType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymScope FindNameOnlyInType(string name)
|
||
{
|
||
return null;
|
||
}
|
||
|
||
public override SymInfo[] GetNames()
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
// public override SymInfo[] GetNames(ExpressionVisitor ev)
|
||
// {
|
||
// return new SymInfo[0];
|
||
// }
|
||
|
||
public override SymInfo[] GetNamesAsInObject()
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNamesAsInObject(ExpressionVisitor ev)
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override SymInfo[] GetNamesInAllTopScopes(bool all_names, ExpressionVisitor ev, bool is_static)
|
||
{
|
||
return new SymInfo[0];
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return si.description;
|
||
}
|
||
}
|
||
/*public class ClassScope : BaseScope
|
||
{
|
||
public override SymInfo[] GetName(string name)
|
||
{
|
||
|
||
}
|
||
|
||
public override BaseScope FindName(string name)
|
||
{
|
||
|
||
}
|
||
}*/
|
||
}
|