EP RScript 修复因跳跃导致的变量层次混乱

This commit is contained in:
2025-10-11 17:24:40 +08:00
parent f850030d10
commit bacfcd550f
8 changed files with 38 additions and 17 deletions

View File

@@ -6,7 +6,7 @@ namespace Convention.RScript.Matcher
{
public bool Match(string expression, ref RScriptSentence sentence)
{
Regex DefineVariableRegex = new(@"^(string|int|double|float|bool|var)\s+([a-zA-Z_][a-zA-Z0-9_]*)$");
Regex DefineVariableRegex = new(@"(string|int|double|float|bool|var)\s+([a-zA-Z_][a-zA-Z0-9_]*)");
var DefineVariableMatch = DefineVariableRegex.Match(expression);
if (DefineVariableMatch.Success)
{