Skip to content

Commit 72b3d14

Browse files
committed
Merge branch 'refs/heads/develop' into release/preview
# Conflicts: # Jenkinsfile
2 parents 593a506 + 2717a98 commit 72b3d14

File tree

126 files changed

+2167
-1178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2167
-1178
lines changed

.github/logo-small-2.png

8.34 KB
Loading

.github/logo-small.png

-3.82 KB
Loading

Build.csproj

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,25 @@
133133
<Target Name="BuildDebugger">
134134
<PropertyGroup>
135135
<DebuggerProject>src/VSCode.DebugAdapter/VSCode.DebugAdapter.csproj</DebuggerProject>
136-
<LocalResolvedOutput>$(DebugAdapterDir)</LocalResolvedOutput>
136+
<DebugSrc>$(DebugAdapterDir)/tmp</DebugSrc>
137137
</PropertyGroup>
138138

139-
<MSBuild Projects="$(DebuggerProject)" Properties="OutputPath=$(LocalResolvedOutput);Configuration=Release"/>
139+
<MSBuild Projects="$(DebuggerProject)" Properties="OutputPath=$(DebugSrc);Configuration=Release"/>
140+
141+
<ItemGroup>
142+
<DbgBinFiles Include="$(DebugSrc)/*.dll"/>
143+
<DbgBinFiles Include="$(DebugSrc)/*.exe"/>
144+
<DbgBinFiles Include="$(DebugSrc)/*.config"/>
145+
<DbgPackageFiles Include="$(DebugSrc)/README.md"/>
146+
<DbgPackageFiles Include="$(DebugSrc)/package.json"/>
147+
<DbgImageFiles Include="$(DebugSrc)/images/**"/>
148+
</ItemGroup>
149+
150+
<Copy SourceFiles="@(DbgBinFiles)" DestinationFolder="$(DebugAdapterDir)/bin"/>
151+
<Copy SourceFiles="@(DbgPackageFiles)" DestinationFolder="$(DebugAdapterDir)"/>
152+
<Copy SourceFiles="@(DbgImageFiles)" DestinationFolder="$(DebugAdapterDir)/images"/>
153+
154+
<RemoveDir Directories="$(DebugSrc)"/>
140155

141156
</Target>
142157

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pipeline {
55

66
environment {
77
VersionPrefix = '2.0.0'
8-
VersionSuffix = 'rc5'
8+
VersionSuffix = 'rc6'
99
outputEnc = '65001'
1010
}
1111

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Проект является независимой кросс-платформенной реализацией виртуальной машины, исполняющей скрипты на языке 1С:Предприятие ##
66

7-
![Logo](.github/logo-small.png)
7+
![Logo](.github/logo-small-2.png) ![Logo](.github/logo-small.png)
88

99
При этом библиотеки системы 1С:Предприятие не используются и не требуется установка системы 1С:Предприятие на целевой машине.
1010

install/examples/distr_build.os

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@
132132
ПараметрыЗапуска = Новый Массив;
133133
ПараметрыЗапуска.Добавить("CREATEINFOBASE");
134134
ПараметрыЗапуска.Добавить("File="""+КаталогВременнойБазы+""";");
135-
ПараметрыЗапуска.Добавить("/UseTemplate""" + мКаталогСборки + "\source.cf" + """");
136135
ПараметрыЗапуска.Добавить("/Out""" + ФайлИнформации() + """");
137136

138137
Сообщить("Создание временной базы");

src/OneScript.Core/Contexts/Variable.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,11 @@ public static IVariable Create(IValue val, string symbol)
3232

3333
public static IVariable CreateReference(IVariable variable, string refName)
3434
{
35-
if (variable is VariableReference vref)
35+
if (variable is VariableReference vref && vref._reference is IndexedValueReference iv)
3636
{
37-
if (vref._reference is IndexedValueReference iv)
38-
{
39-
_ = iv.Value;
40-
}
41-
42-
return variable;
37+
_ = iv.Value; // проверить правильность индекса
4338
}
39+
4440
return new VariableReference(variable, refName);
4541
}
4642

src/OneScript.Core/TypeUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public static bool IsNumeric(this Type type)
1818
switch (Type.GetTypeCode(type))
1919
{
2020
case TypeCode.Int32:
21+
return !type.IsEnum;
2122
case TypeCode.Decimal:
2223
case TypeCode.UInt32:
2324
case TypeCode.Int64:

src/OneScript.Core/Values/BslBooleanValue.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This Source Code Form is subject to the terms of the
99
using OneScript.Exceptions;
1010
using OneScript.Localization;
1111
using OneScript.Types;
12+
using ScriptEngine.Machine;
1213

1314
namespace OneScript.Values
1415
{
@@ -57,12 +58,15 @@ public override string ToString()
5758

5859
public override bool Equals(BslValue other)
5960
{
60-
if (ReferenceEquals(null, other))
61-
return false;
62-
if (ReferenceEquals(this, other))
63-
return true;
61+
if (other is null) return false;
62+
if (ReferenceEquals(this, other)) return true;
6463

65-
return false;
64+
return other switch
65+
{
66+
BslNumericValue num => num == ((decimal)this),
67+
BslBooleanValue boolean => _flag == boolean._flag,
68+
_ => false
69+
};
6670
}
6771

6872
public override int CompareTo(BslValue other)

src/ScriptEngine/Machine/Contexts/ClrEnumValueWrapper.cs renamed to src/OneScript.Core/Values/ClrEnumValueWrapper.cs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,25 @@ This Source Code Form is subject to the terms of the
66
----------------------------------------------------------*/
77

88
using OneScript.Commons;
9+
using OneScript.Types;
910

10-
namespace ScriptEngine.Machine.Contexts
11+
namespace OneScript.Values
1112
{
1213
public class ClrEnumValueWrapper<T> : EnumerationValue, IObjectWrapper where T :struct
1314
{
1415
private readonly T _realValue;
1516

16-
public ClrEnumValueWrapper(EnumerationContext owner, T realValue):base(owner)
17-
{
17+
public ClrEnumValueWrapper(TypeDescriptor systemType, T realValue, string name, string alias)
18+
: base (systemType, name, alias)
19+
{
1820
_realValue = realValue;
1921
}
2022

21-
public object UnderlyingObject
22-
{
23-
get
24-
{
25-
return _realValue;
26-
}
27-
}
23+
public object UnderlyingObject => _realValue;
2824

29-
public T UnderlyingValue
30-
{
31-
get
32-
{
33-
return _realValue;
34-
}
35-
}
25+
public T UnderlyingValue => _realValue;
3626

37-
public override bool Equals(IValue other)
27+
public override bool Equals(BslValue other)
3828
{
3929
if (!(other?.GetRawValue() is ClrEnumValueWrapper<T> otherWrapper))
4030
return false;

0 commit comments

Comments
 (0)