Добавлены константы в режимы ## и ###

a.EachCount - без GroupBy можно
This commit is contained in:
Mikhalkovich Stanislav 2021-07-08 11:51:22 +03:00
parent b4499e8658
commit d61b231059
12 changed files with 1976 additions and 1949 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "8";
public const string Build = "0";
public const string Revision = "2920";
public const string Revision = "2926";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=2920
%REVISION%=2926
%MINOR%=8
%MAJOR%=3

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: DESKTOP-G8V08V4
// DateTime: 29.06.2021 9:47:21
// DateTime: 06.07.2021 21:55:27
// UserName: ?????????
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>

View file

@ -2415,6 +2415,10 @@ proc_func_decl_noclass
$$ = new procedure_definition($1 as procedure_header, null, @$);
($$ as procedure_definition).proc_header.proc_attributes.Add((procedure_attribute)$2, $2.source_context);
}
| tkConst const_decl
{
$$ = new consts_definitions_list($2 as const_definition, @$);
}
;
inclass_proc_func_decl

File diff suppressed because it is too large Load diff

View file

@ -339,5 +339,6 @@ script=

View file

@ -1 +1 @@
3.8.0.2920
3.8.0.2926

View file

@ -1 +1 @@
!define VERSION '3.8.0.2920'
!define VERSION '3.8.0.2926'

View file

@ -13063,6 +13063,12 @@ begin
Result := Self.ToDictionary(g -> g.Key, g -> g.Count);
end;
/// Возвращает частотный словарь объектов последовательности
function EachCount<T>(Self: sequence of T): Dictionary<T,integer>; extensionmethod;
begin
Result := Self.GroupBy(x->x).ToDictionary(g -> g.Key, g -> g.Count);
end;
/// Возвращает словарь, сопоставляющий ключу группы результат групповой операции
function Each<Key,Source,Res>(Self: sequence of System.Linq.IGrouping<Key,Source>; grOperation: System.Linq.IGrouping<Key,Source> -> Res): Dictionary<Key,Res>; extensionmethod;
begin

View file

@ -1,6 +1,7 @@
###
function Ord1(a: char): integer := 2;
function Ord1(a: char): integer := 2;
function Ord1(a: integer): boolean := False;
Assert(|1,2,3,4|.Sel(Ord1).First = False)
begin
Assert(|1,2,3,4|.Select(Ord1).First = False)
end.

View file

@ -1,3 +1,4 @@
###
Assert(|1,2,3,4|.Sel(Ord).First=1)
begin
Assert(|1,2,3,4|.Select(Ord).First=1)
end.

View file

@ -13063,6 +13063,12 @@ begin
Result := Self.ToDictionary(g -> g.Key, g -> g.Count);
end;
/// Возвращает частотный словарь объектов последовательности
function EachCount<T>(Self: sequence of T): Dictionary<T,integer>; extensionmethod;
begin
Result := Self.GroupBy(x->x).ToDictionary(g -> g.Key, g -> g.Count);
end;
/// Возвращает словарь, сопоставляющий ключу группы результат групповой операции
function Each<Key,Source,Res>(Self: sequence of System.Linq.IGrouping<Key,Source>; grOperation: System.Linq.IGrouping<Key,Source> -> Res): Dictionary<Key,Res>; extensionmethod;
begin