Skip to content

Commit 01ca1bf

Browse files
Squashed commit of the following:
commit 9f48a98 Author: Tosoks67 <tosoks67@gmail.com> Date: Tue Jan 20 19:50:53 2026 +0100 exiled ammo limit methods commit 129914d Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:09:54 2026 +0100 Update LogVarMethod.cs commit c0a3d11 Merge: d74a39b 6f40934 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:07:40 2026 +0100 Merge branch 'dev' of https://github.com/ScriptedEvents/ScriptedEventsReloaded into dev commit d74a39b Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:07:39 2026 +0100 define ToString for Variable commit dbd8dfa Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:06:46 2026 +0100 Update MainPlugin.cs commit e3779dd Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:06:41 2026 +0100 Create LogVarMethod.cs commit 6625cb7 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:06:38 2026 +0100 Update MethodIndex.cs commit 5181ef4 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Tue Jan 20 16:06:23 2026 +0100 add VariableArgument<T> commit 6f40934 Author: Tosoks67 <tosoks67@gmail.com> Date: Mon Jan 19 23:31:07 2026 +0100 Create ParsePlayersMethod.cs commit 4d587a8 Merge: 9bbf264 86fb6ff Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Mon Jan 19 16:52:54 2026 +0100 Merge branch 'dev' of https://github.com/ScriptedEvents/ScriptedEventsReloaded into dev commit 9bbf264 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Mon Jan 19 16:52:52 2026 +0100 improve TypeOfValue system commit 86fb6ff Author: Tosoks67 <126388095+Tosoks67@users.noreply.github.com> Date: Mon Jan 19 11:57:09 2026 +0100 My steamid because I want da badge commit 1b13f6f Author: Tosoks67 <tosoks67@gmail.com> Date: Sun Jan 18 23:16:16 2026 +0100 typo fix because andrzej is stoopid commit 7a901e8 Merge: e3bb82f b88bc82 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 18:18:58 2026 +0100 Merge branch 'main' into dev commit e3bb82f Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 17:55:38 2026 +0100 I FUCKING HATE YOU NW commit 0d698b7 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 16:41:06 2026 +0100 Update CreateGrenadeMethod.cs commit af6c02e Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 16:17:50 2026 +0100 Update NumericExpressionReslover.cs commit 1696a72 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 16:17:16 2026 +0100 add "isnt" commit f1bb59d Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 16:12:45 2026 +0100 support "or" "is" "and" operators in condtions, fix small bug commit 5f9f7fc Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 16:12:11 2026 +0100 Create PickupExistsMethod.cs commit cbe680b Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 18 16:12:09 2026 +0100 rename DeletePickup to DestroyPickup commit 157eec3 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 12:34:20 2026 +0100 rename Pickup to CreatePickup commit b38a5ca Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 12:34:06 2026 +0100 rename Grenade to CreateGrenade commit 190ad56 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 12:28:46 2026 +0100 update error handling commit 7a35143 Merge: b697e6d ed1e5cc Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 12:26:51 2026 +0100 Merge branch 'main' into dev commit b697e6d Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 12:10:32 2026 +0100 improve invalid first token error commit 6cb72dd Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 11:30:57 2026 +0100 add thunder to contributors commit 5833383 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sat Jan 17 11:10:14 2026 +0100 change iteration types from uint to ulong commit 65569cd Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 19:27:16 2026 +0100 it should actually be 0.12 commit f2777c7 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:31:03 2026 +0100 fix contribution importance order commit e3a49cc Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:28:03 2026 +0100 Update MainPlugin.cs commit a00c1ed Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:16:32 2026 +0100 add contributor ranks commit 93f4805 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:15:32 2026 +0100 Update CommandEvents.cs commit e865ceb Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:15:27 2026 +0100 Update BetterCoros.cs commit c1ea968 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:15:24 2026 +0100 add method yielding for safety commit 7b6e9c0 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 15:14:52 2026 +0100 fix foreach variable assignment commit 1861d10 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 14:28:13 2026 +0100 Update ShowMethod.cs commit 7cd521b Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 14:27:06 2026 +0100 fuck me commit 8c59ab9 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 14:26:51 2026 +0100 turns out its compiler generated commit db66ecd Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 14:24:58 2026 +0100 make JetBrains.Annotations global commit ec3947e Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 14:24:43 2026 +0100 Create ShowMethod.cs commit bc43338 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 10:56:31 2026 +0100 fix Cassie method commit 08dc77d Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 10:42:23 2026 +0100 Update CassieMethod.cs commit 58536cc Merge: 600104a b8db82e Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 10:41:39 2026 +0100 Merge branch 'main' into dev commit 600104a Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 10:40:33 2026 +0100 Update NumericExpressionReslover.cs commit 924048e Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Fri Jan 16 10:40:28 2026 +0100 update labapi commit 0374ca6 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 18:27:31 2026 +0100 support .ser files commit 17a891a Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 18:27:23 2026 +0100 fix RemovePlayers method bug commit 3df09cb Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 17:14:10 2026 +0100 Update SER.csproj commit d6556d7 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 17:14:07 2026 +0100 add IsEnabled config option commit 5c019ba Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 17:13:54 2026 +0100 Update BetterCoros.cs commit 4689f3b Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 16:53:52 2026 +0100 Update LoopContextWithSingleIterationVariable.cs commit 7290a70 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 16:51:31 2026 +0100 improve error handling commit e6b8e36 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 13:51:30 2026 +0100 small changes commit 753d642 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 13:39:34 2026 +0100 make TryGet<Context> into Context commit 2e2e66b Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Thu Jan 15 13:31:09 2026 +0100 small changes (TypeOfValue, ParentContextControlMessage, prefix removal from var tokens) commit cc516a5 Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Mon Jan 12 22:30:11 2026 +0100 added direct EXILED support commit 114350b Author: Andrzej <100864896+Elektryk-Andrzej@users.noreply.github.com> Date: Sun Jan 11 20:48:35 2026 +0100 big changes
1 parent b88bc82 commit 01ca1bf

File tree

131 files changed

+1745
-570
lines changed

Some content is hidden

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

131 files changed

+1745
-570
lines changed

Code/ArgumentSystem/Arguments/VariableArgument.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using JetBrains.Annotations;
22
using SER.Code.ArgumentSystem.BaseArguments;
3+
using SER.Code.Helpers.Extensions;
34
using SER.Code.Helpers.ResultSystem;
45
using SER.Code.TokenSystem.Tokens;
56
using SER.Code.TokenSystem.Tokens.VariableTokens;
@@ -24,4 +25,23 @@ public DynamicTryGet<Variable> GetConvertSolution(BaseToken token)
2425

2526
return new(() => variableToken.TryGetVariable());
2627
}
28+
}
29+
30+
public class VariableArgument<T>(string name) : Argument(name) where T : Variable
31+
{
32+
public override string InputDescription => $"A {typeof(T).FriendlyTypeName()}";
33+
34+
[UsedImplicitly]
35+
public DynamicTryGet<T> GetConvertSolution(BaseToken token)
36+
{
37+
if (token is not VariableToken variableToken)
38+
{
39+
return $"Value '{token.RawRep}' is not a variable.";
40+
}
41+
42+
return new(() => variableToken
43+
.TryGetVariable()
44+
.SuccessTryCast<Variable, T>()
45+
);
46+
}
2747
}

Code/ArgumentSystem/ProvidedArguments.cs

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ namespace SER.Code.ArgumentSystem;
2020

2121
public class ProvidedArguments(Method method)
2222
{
23-
private Dictionary<(string name, Type type), List<DynamicTryGet>> Arguments { get; } = [];
23+
private Dictionary<(string name, Type type), List<DynamicTryGet>> ArgumentValues { get; } = [];
2424

25+
public T GetVariable<T>(string argName) where T : Variable
26+
{
27+
return GetValue<T, VariableArgument<T>>(argName);
28+
}
29+
2530
public Database GetDatabase(string argName)
2631
{
2732
return GetValue<Database, DatabaseArgument>(argName);
@@ -211,7 +216,7 @@ private List<DynamicTryGet<TValue>> GetEvaluators<TValue, TArg>(string argName)
211216
{
212217
if (evaluator.Result.HasErrored(out var error))
213218
{
214-
throw new ScriptRuntimeError(mainErr + error);
219+
throw new CustomScriptRuntimeError(mainErr + error);
215220
}
216221

217222
if (evaluator is not DynamicTryGet<TValue> argEvalRes)
@@ -226,7 +231,7 @@ private List<DynamicTryGet<TValue>> GetEvaluators<TValue, TArg>(string argName)
226231

227232
private List<DynamicTryGet> GetValueInternal<TValue, TArg>(string argName)
228233
{
229-
if (Arguments.TryGetValue((argName, typeof(TArg)), out var value))
234+
if (ArgumentValues.TryGetValue((argName, typeof(TArg)), out var value))
230235
{
231236
return value;
232237
}
@@ -239,18 +244,28 @@ private List<DynamicTryGet> GetValueInternal<TValue, TArg>(string argName)
239244

240245
if (foundArg.DefaultValue is null)
241246
{
242-
throw new ScriptRuntimeError($"Method '{method.Name}' is missing required argument '{argName}'.");
247+
throw new CustomScriptRuntimeError($"{method} is missing a required argument '{argName}'.");
243248
}
244249

245250
return foundArg.DefaultValue.Value switch
246251
{
247-
TValue argValue => [new DynamicTryGet<TValue>(argValue)],
248-
IEnumerable<TValue> listValue => listValue.Select(DynamicTryGet (v) => new DynamicTryGet<TValue>(v)).ToList(),
249-
null => [new DynamicTryGet<TValue>((TValue)(object)null!)], // magik
252+
TValue argValue => [
253+
new DynamicTryGet<TValue>(argValue)
254+
],
255+
256+
IEnumerable<TValue> listValue => listValue
257+
.Select(DynamicTryGet (v) => new DynamicTryGet<TValue>(v))
258+
.ToList(),
259+
260+
null => [
261+
new DynamicTryGet<TValue>((TValue)(object)null!)
262+
], // magik
263+
250264
_ => throw new AndrzejFuckedUpException(
251265
$"Argument {argName} for method {method.Name} has its default value set to type " +
252266
$"{foundArg.DefaultValue?.GetType().AccurateName ?? "null"}, expected of type {typeof(TValue).Name} or a list of " +
253-
$"{typeof(TValue).Name}s.")
267+
$"{typeof(TValue).Name}s."
268+
)
254269
};
255270
}
256271

@@ -259,10 +274,10 @@ public void Add(ArgumentValueInfo valueInfo)
259274
Log.Debug($"adding {valueInfo.Name} for method {method.Name} ({method.GetHashCode()})");
260275
if (!valueInfo.IsPartOfCollection)
261276
{
262-
Arguments.Add((valueInfo.Name, valueInfo.ArgumentType), [valueInfo.Evaluator]);
277+
ArgumentValues.Add((valueInfo.Name, valueInfo.ArgumentType), [valueInfo.Evaluator]);
263278
return;
264279
}
265280

266-
Arguments.AddOrInitListWithKey((valueInfo.Name, valueInfo.ArgumentType), valueInfo.Evaluator);
281+
ArgumentValues.AddOrInitListWithKey((valueInfo.Name, valueInfo.ArgumentType), valueInfo.Evaluator);
267282
}
268283
}

Code/ContextSystem/BaseContexts/Context.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using SER.Code.ContextSystem.Structures;
2-
using SER.Code.Helpers.Extensions;
32
using SER.Code.Helpers.ResultSystem;
43
using SER.Code.ScriptSystem;
54
using SER.Code.TokenSystem.Tokens;
@@ -8,14 +7,14 @@ namespace SER.Code.ContextSystem.BaseContexts;
87

98
public abstract class Context
109
{
11-
public string Name => GetType().FriendlyTypeName();
12-
1310
public required Script Script { get; set; } = null!;
14-
11+
1512
public required uint? LineNum { get; set; }
1613

1714
public StatementContext? ParentContext { get; set; } = null;
1815

16+
protected abstract string FriendlyName { get; }
17+
1918
public abstract TryAddTokenRes TryAddToken(BaseToken token);
2019

2120
public abstract Result VerifyCurrentState();
@@ -30,6 +29,9 @@ public static Context Create(Type contextType, (Script scr, uint? lineNum) info)
3029

3130
public override string ToString()
3231
{
33-
return Name;
32+
if (LineNum.HasValue)
33+
return $"{FriendlyName} at line {LineNum}";
34+
35+
return FriendlyName;
3436
}
3537
}
Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using SER.Code.ContextSystem.Structures;
1+
using SER.Code.ContextSystem.Extensions;
2+
using SER.Code.ContextSystem.Interfaces;
3+
using SER.Code.ContextSystem.Structures;
24

35
namespace SER.Code.ContextSystem.BaseContexts;
46

@@ -10,23 +12,41 @@ public abstract class LoopContext : StatementContext, IExtendableStatement, IKey
1012
public abstract string KeywordName { get; }
1113
public abstract string Description { get; }
1214
public abstract string[] Arguments { get; }
13-
14-
public bool SkipThisIteration { get; protected set; }
15-
public bool ExitLoop { get; protected set; }
1615

16+
protected bool ReceivedContinue;
17+
protected bool ReceivedBreak;
1718
protected override void OnReceivedControlMessageFromChild(ParentContextControlMessage msg)
1819
{
1920
switch (msg)
2021
{
21-
case ParentContextControlMessage.LoopContinue:
22-
SkipThisIteration = true;
22+
case Continue:
23+
ReceivedContinue = true;
2324
return;
24-
case ParentContextControlMessage.LoopBreak:
25-
ExitLoop = true;
25+
case Break:
26+
ReceivedBreak = true;
2627
return;
2728
default:
2829
ParentContext?.SendControlMessage(msg);
2930
break;
3031
}
3132
}
33+
34+
protected override IEnumerator<float> RunChildren()
35+
{
36+
foreach (var coro in Children
37+
.TakeWhile(_ => !ReceivedBreak)
38+
.TakeWhile(_ => Script.IsRunning)
39+
.Select(child => child.ExecuteBaseContext()))
40+
{
41+
while (coro.MoveNext())
42+
{
43+
yield return coro.Current;
44+
}
45+
46+
if (!ReceivedContinue) continue;
47+
48+
ReceivedContinue = false;
49+
break;
50+
}
51+
}
3252
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using SER.Code.ContextSystem.CommunicationInterfaces;
2+
using SER.Code.Helpers.Extensions;
3+
using SER.Code.Helpers.ResultSystem;
4+
using SER.Code.TokenSystem.Tokens.VariableTokens;
5+
using SER.Code.ValueSystem;
6+
using SER.Code.VariableSystem.Bases;
7+
8+
namespace SER.Code.ContextSystem.BaseContexts;
9+
10+
public abstract class LoopContextWithSingleIterationVariable<TVal> :
11+
LoopContext,
12+
IAcceptOptionalVariableDefinitions
13+
where TVal : Value
14+
{
15+
private VariableToken? _iterationVariableToken;
16+
private Variable? _iterationVariable;
17+
18+
public Result SetOptionalVariables(params VariableToken[] variableTokens)
19+
{
20+
if (variableTokens.FirstOrDefault() is not {} varToken) return true;
21+
22+
if (!varToken.ValueType.IsAssignableFrom(typeof(TVal)))
23+
{
24+
return $"Provided variable '{varToken.RawRepr}' cannot be used for this loop, " +
25+
$"as it cannot hold a {typeof(TVal).FriendlyTypeName()}";
26+
}
27+
28+
_iterationVariableToken = varToken;
29+
return true;
30+
}
31+
32+
protected void SetVariable(TVal value)
33+
{
34+
if (_iterationVariableToken is null) return;
35+
36+
_iterationVariable = Variable.Create(_iterationVariableToken.Name, value);
37+
Script.AddVariable(_iterationVariable);
38+
}
39+
40+
protected void RemoveVariable()
41+
{
42+
if (_iterationVariable is null) return;
43+
44+
Script.RemoveVariable(_iterationVariable);
45+
_iterationVariable = null;
46+
}
47+
}

Code/ContextSystem/BaseContexts/StatementContext.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using SER.Code.ContextSystem.Structures;
1+
using SER.Code.ContextSystem.Extensions;
2+
using SER.Code.ContextSystem.Structures;
23
using SER.Code.Helpers;
34

45
namespace SER.Code.ContextSystem.BaseContexts;
@@ -9,12 +10,25 @@ public abstract class StatementContext : YieldingContext
910

1011
public void SendControlMessage(ParentContextControlMessage msg)
1112
{
12-
Log.Debug($"{Name} context has received control message: {msg}");
13+
Log.Debug($"{this} has received control message: {msg}");
1314
OnReceivedControlMessageFromChild(msg);
1415
}
1516

1617
protected virtual void OnReceivedControlMessageFromChild(ParentContextControlMessage msg)
1718
{
1819
ParentContext?.SendControlMessage(msg);
1920
}
21+
22+
protected virtual IEnumerator<float> RunChildren()
23+
{
24+
foreach (var coro in Children
25+
.TakeWhile(_ => Script.IsRunning)
26+
.Select(child => child.ExecuteBaseContext()))
27+
{
28+
while (coro.MoveNext())
29+
{
30+
yield return coro.Current;
31+
}
32+
}
33+
}
2034
}

Code/ContextSystem/BaseContexts/YieldingContext.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
using SER.Code.Helpers;
1+
using SER.Code.ContextSystem.Interfaces;
2+
using SER.Code.Helpers;
23

34
namespace SER.Code.ContextSystem.BaseContexts;
45

56
public abstract class YieldingContext : Context
67
{
78
public IEnumerator<float> Run()
89
{
10+
if (this is INotRunningContext)
11+
{
12+
yield break;
13+
}
14+
915
var prof = Script.Profile is not null
10-
? new Profile(Script.Profile, $"running YieldingContext {Name}")
16+
? new Profile(Script.Profile, $"running YieldingContext {this}")
1117
: null;
1218

1319
if (LineNum.HasValue)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using SER.Code.Helpers.ResultSystem;
2+
using SER.Code.TokenSystem.Tokens.VariableTokens;
3+
4+
namespace SER.Code.ContextSystem.CommunicationInterfaces;
5+
6+
/// <summary>
7+
/// Marks that the context before is a statement that accepts optional variable definitions.
8+
/// </summary>
9+
public interface IAcceptOptionalVariableDefinitions
10+
{
11+
public Result SetOptionalVariables(params VariableToken[] variableTokens);
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using SER.Code.ContextSystem.BaseContexts;
2+
using SER.Code.Helpers.ResultSystem;
3+
4+
namespace SER.Code.ContextSystem.CommunicationInterfaces;
5+
6+
/// <summary>
7+
/// Requests the previous statement context to be provided
8+
/// </summary>
9+
public interface IRequireCurrentStatement
10+
{
11+
public Result AcceptStatement(StatementContext context);
12+
}

0 commit comments

Comments
 (0)