Добавлены константы в режимы ## и ###
a.EachCount - без GroupBy можно
This commit is contained in:
parent
b4499e8658
commit
d61b231059
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=0
|
||||
%REVISION%=2920
|
||||
%REVISION%=2926
|
||||
%MINOR%=8
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -339,5 +339,6 @@ script=
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.8.0.2920
|
||||
3.8.0.2926
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.8.0.2920'
|
||||
!define VERSION '3.8.0.2926'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
###
|
||||
Assert(|1,2,3,4|.Sel(Ord).First=1)
|
||||
begin
|
||||
Assert(|1,2,3,4|.Select(Ord).First=1)
|
||||
end.
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue