Commit graph

4923 commits

Author SHA1 Message Date
Ivan Bondarev e3ee0fed4c #3097 2024-08-13 13:49:30 +02:00
Ivan Bondarev d396c4a9fe #3178 2024-08-13 10:40:23 +02:00
Ivan Bondarev 0d846d2335
Merge pull request #3170 from samuraiGH/ForeachResolver-rework
Foreach resolver rework
2024-08-12 15:24:11 +02:00
samuraiGH a65a869211 increasing pcu file version 2024-08-12 15:54:32 +03:00
Mikhalkovich Stanislav e91e353984 Обновленный модуль Turtle.pas 2024-08-11 15:21:29 +03:00
Mikhalkovich Stanislav c18238df39 3.9.0.3523 2024-08-06 20:18:57 +03:00
Mikhalkovich Stanislav 1da2b524a6 School PrimeDivisors 2024-08-06 19:34:10 +03:00
AlexanderZemlyak 47c61d8b14
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
2024-08-02 10:48:07 +03:00
AlexanderZemlyak fc3ab96cae
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
2024-08-02 10:46:40 +03:00
Mikhalkovich Stanislav 64acde6460 Сделал возможным неявное приведение некоторого типа к array of T (при описании оператора в виде статической функции класса)
School - IsPrime(n)
2024-07-31 18:21:04 +03:00
Mikhalkovich Stanislav 3db5709101 ZipCartesianFuncs.pas 2024-07-31 10:56:18 +03:00
Mikhalkovich Stanislav c4fd47128b Zip, Cartesian - сделаны внешние функции до 5 параметров, в т.ч. с проекцией
Zip, Cartesian - методы расширения дополнены чтобы было как во внешних
Перегенерирована справка
2024-07-30 22:56:03 +03:00
AlexanderZemlyak 35c7bc5877
Add constructors to scanner, parser and parserTools (#3185)
* Add constructors to scanner, parser and parserTools

Добавил конструкторы, чтобы код был почище

* Change type of keywords in Scanner

* Make cast explicit

* Rebuild ABCPascal.cs
2024-07-21 13:36:15 +03:00
Mikhalkovich Stanislav ca141804c7 Обновление School 2024-07-19 16:04:49 +03:00
Mikhalkovich Stanislav a8b7dc8be7 Пока закомментировал превращение множеств в массивы 2024-07-19 13:01:43 +03:00
Mikhalkovich Stanislav 84205f86bf SetOf на замену [1,2,3]
Преобразование массивов стандартных типов к множествам того же типа
2024-07-19 11:30:18 +03:00
Mikhalkovich Stanislav 8c22930a8c Добавлена
class function operator implicit<T>(s: array of T): TypedSet;

И поправлены кое-какие условия при неявных приведениях типов. Но видимо они никогда не работают
2024-07-18 22:23:39 +03:00
Mikhalkovich Stanislav 0fbfebb379 fix #3184 2024-07-17 11:16:59 +03:00
Mikhalkovich Stanislav b8fec95599 Большое изменение в Dictionaries
1 to 2 - новый оператор в стиле Котлина для пары Ключ-Значение
Pair - синоним KV. KV - не запоминается
Теперь:
  d := Dict(1 to 2, 3 to 4)
   или
  d := Dict(Pair(1,2),Pair(3,4)

Кроме того
Новые конструкторы
  d := Dict(d1) - копия
  d := Dict(keys,values)
d.Update(d1)
d + d1
d += d1
d + pair
d - Seq(ключ)
d -= Seq(ключ)
2024-07-15 13:50:11 +03:00
AlexanderZemlyak 97c29a4e1b
Compiler tiding up, refactoring Keywords class and uniting errors in Errors file (#3179)
* Tidy up first part of compiler code

* Rename Net Compiler Options

* Move CompilationErrors to Errors project

* Return default constructor to compiler warning

* Rename semantic check for include namespaces in unit

* Create two Errors files instead of one in Errors project

* Fix current unit is not main program check

* Add documentation to compilation errors in Errors project

* Return compiler thrown errors to Compiler project

* Refactor keywords class - extract base keywords functionality

* Fix keywords case sensitivity

* Fix case sensitivity again...

* Optimize keywords initialization

* Fix parse expression error because of wrong constructor call
2024-07-13 18:44:49 +03:00
Mikhalkovich Stanislav 78748e10a3 SymTable - исправление чтобы не показывать статические методы в ///#!
WPF - правки
2024-07-12 20:54:52 +03:00
Mikhalkovich Stanislav 17d5c48dd8 3.9.0.3503 2024-07-08 23:34:58 +03:00
nevermind322 f680461234
Assign tuple optimizer (#3162)
* branch init

* add BindCollectLightSymInfo

* moved lightsyminfo to syntaxVisitors

* LIghtSymInfo fixes

* binder 0.1

* Attributes -> SymbolAttributes

* AssignTupleOptimizer -> AssignTupleDesugar

* moved algorithm classes to AssignTupleDesugarAlgorithm namespace

* fixes and refactoring

* LightSymInfo rework

* add rebuildDebug and build units

* enable VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer

* remove CollectFullLightSymInfo call

* bind now return BindResult

* change BindResult path type

* path testing

* fix Current in BindCollectLightSymInfo

* fix Current in BindCollectLightSymInfo

* potential symomyms handling without assigns count minimization

* assign count minimization

* rename AssignTuplesDesugar

* move NewAssignTupleDesugar

* add optimization switch

* delete AssignTupleDesugar project

* remove comments

* Assign tuple optimizer (#3142)

* branch init

* add BindCollectLightSymInfo

* moved lightsyminfo to syntaxVisitors

* LIghtSymInfo fixes

* binder 0.1

* Attributes -> SymbolAttributes

* AssignTupleOptimizer -> AssignTupleDesugar

* moved algorithm classes to AssignTupleDesugarAlgorithm namespace

* fixes and refactoring

* LightSymInfo rework

* add rebuildDebug and build units

* enable VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer

* remove CollectFullLightSymInfo call

* bind now return BindResult

* change BindResult path type

* path testing

* fix Current in BindCollectLightSymInfo

* fix Current in BindCollectLightSymInfo

* potential symomyms handling without assigns count minimization

* assign count minimization

* rename AssignTuplesDesugar

* move NewAssignTupleDesugar

* add optimization switch

* delete AssignTupleDesugar project

* remove comments

* collect symbols from var tuples

* optimize var_tuple_def_statement and assign_var_tuple

* fix

* fix Tuple Visitor

* fix CollectLightSymInfo (#3143)

* branch init

* add BindCollectLightSymInfo

* moved lightsyminfo to syntaxVisitors

* LIghtSymInfo fixes

* binder 0.1

* Attributes -> SymbolAttributes

* AssignTupleOptimizer -> AssignTupleDesugar

* moved algorithm classes to AssignTupleDesugarAlgorithm namespace

* fixes and refactoring

* LightSymInfo rework

* add rebuildDebug and build units

* enable VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer

* remove CollectFullLightSymInfo call

* bind now return BindResult

* change BindResult path type

* path testing

* fix Current in BindCollectLightSymInfo

* fix Current in BindCollectLightSymInfo

* potential symomyms handling without assigns count minimization

* assign count minimization

* rename AssignTuplesDesugar

* move NewAssignTupleDesugar

* add optimization switch

* delete AssignTupleDesugar project

* remove comments

* collect symbols from var tuples

* optimize var_tuple_def_statement and assign_var_tuple

* fix

* fix Tuple Visitor

* 3.9.0.3489

* fix

* Assign tuple optimizer (#3147)

* branch init

* add BindCollectLightSymInfo

* moved lightsyminfo to syntaxVisitors

* LIghtSymInfo fixes

* binder 0.1

* Attributes -> SymbolAttributes

* AssignTupleOptimizer -> AssignTupleDesugar

* moved algorithm classes to AssignTupleDesugarAlgorithm namespace

* fixes and refactoring

* LightSymInfo rework

* add rebuildDebug and build units

* enable VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer

* remove CollectFullLightSymInfo call

* bind now return BindResult

* change BindResult path type

* path testing

* fix Current in BindCollectLightSymInfo

* fix Current in BindCollectLightSymInfo

* potential symomyms handling without assigns count minimization

* assign count minimization

* rename AssignTuplesDesugar

* move NewAssignTupleDesugar

* add optimization switch

* delete AssignTupleDesugar project

* remove comments

* collect symbols from var tuples

* optimize var_tuple_def_statement and assign_var_tuple

* fix

* fix Tuple Visitor

* fix

* add const optimization

* Удалил лишнее

---------

Co-authored-by: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Co-authored-by: Артём Филонов <afilono@sfedu.ru>
Co-authored-by: Sun Serega <sunserega2@gmail.com>
2024-07-08 20:35:57 +03:00
Mikhalkovich Stanislav b086568133 err 0540 0541 поправил 2024-07-08 12:27:44 +03:00
Mikhalkovich Stanislav acfce9b4f7 одномерный 2024-07-07 15:59:04 +03:00
Ivan Bondarev af2bc0fda8 #3165 2024-07-07 11:17:26 +02:00
Mikhalkovich Stanislav f528ee0ad8 Удалил неработающий тест 2024-07-07 00:03:06 +03:00
Mikhalkovich Stanislav c7884d8321 Убрали зависимость компилятора от парсера Паскаля 2024-07-04 23:03:22 +03:00
Ivan Bondarev 2955479709
Merge pull request #3176 from SunSerega/build-dep
Исправление зависимостей после конфликта последних двух PR
2024-07-04 21:37:19 +02:00
Ivan Bondarev 02aaaccdd6 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet 2024-07-04 19:19:46 +02:00
Ivan Bondarev 9d3e2db5ec #3164 2024-07-04 19:19:37 +02:00
Mikhalkovich Stanislav 46f34dae13 LightPT - убрал CheckOutputNew
TasksArr.pas, TasksStr.pas - правки
2024-07-04 13:43:35 +03:00
Sun Serega f9c47b8f73
Fix dependencies in Compiler project 2024-07-02 21:25:09 +02:00
Sun Serega 53c1e32041
Remove extra tests 2024-07-02 21:25:04 +02:00
Mikhalkovich Stanislav 7f988c9bb2 3.9.0.3500
Хороший коммит )
2024-07-02 22:07:23 +03:00
Ivan Bondarev 33e8b383be #3172 2024-07-02 20:49:12 +02:00
Mikhalkovich Stanislav 50a0fdc4fc Поправил в трех проектах пути к bin
LightPT - Read...(prompt) - больше комбинаций

Loop_If_2_Sum в Tasks1Loops.pas
2024-07-02 21:45:28 +03:00
Mikhalkovich Stanislav b471da4499 Поправлены Tasks1Arr.pas Tasks1Begin.pas Tasks1BoolIfCase.pas 2024-07-02 17:06:45 +03:00
AlexanderZemlyak d5e9994ff2
Revert pascal language moving to language plugins (#3175)
* Return Parsers folder with standard parsers and move SyntaxTreeConverters back to Core

* Rename PascalLanguage project to PascalABCLanguageInfo

* Fix pascal dll loading
2024-07-02 16:10:50 +03:00
Sun Serega 04e2a40dc6
Исправление зависимостей проектов (#3174)
* Add workflow to build each project separately

* Make `Compiler` depend on `PascalLanguage` and `PascalABCSaushkinParser`  06e595

* Make IDE's depend on `PABCNETC`

It's launched as a separate process from IDE
2024-07-02 16:10:21 +03:00
Sun Serega aa43bfb128
fix GetReferenceFileName dll copy (#3173) 2024-07-02 00:25:09 +03:00
Mikhalkovich Stanislav 67aa35b9dc Поправлен LightPT
Упрощены TasksArr.pas TasksMatr.pas TasksStr.pas
2024-07-01 21:06:54 +03:00
samuraiGH 7d66f26d4f cleanup and more tests 2024-07-01 00:16:43 +03:00
samuraiGH 464dc794a8 cleanup and more comments 2024-06-30 23:31:28 +03:00
samuraiGH 32f126370c attempt to fix GetEnumerator resolving for Pascal types 2024-06-30 21:35:06 +03:00
Mikhalkovich Stanislav bd7059c079 Исправлена Range(a, b, step: real)
LightPT - CheckOutput может принимать параметры типа последователльность - они будут вытягиваться в одну последовательность
  Для этого исправлен FlattenElement
  FlattenOutput применяется автоматически - его теперь не надо вызывать явно
TaskLoops поправлен и упрощен в соответствии с CheckOutput
2024-06-30 12:41:37 +03:00
samuraiGH fb3eeeb28b fix tests 2024-06-29 16:26:35 +03:00
samuraiGH 84b0dfe537 fix getting MethodInfo 2024-06-29 15:49:13 +03:00
samuraiGH 5fa4d9fce7 cold fix set of T resolving 2024-06-28 22:45:07 +03:00
samuraiGH 460ce636ab hot fix set of T resolving 2024-06-28 22:21:06 +03:00