Skip to content

Commit a46a0c1

Browse files
Updated v2.3.2 : Updated EZText Replacements
1 parent 273e4aa commit a46a0c1

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

EZCode/EZCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class EzCode
2323
/// <summary>
2424
/// Directory of the script playing
2525
/// </summary>
26-
public static string Version { get; } = "2.3.0";
26+
public static string Version { get; } = "2.3.1";
2727

2828
#region Variables_and_Initializers
2929
/// <summary>

EZCode/EZCode.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<Title>EZCode WinForms Programming Language</Title>
8-
<Version>2.2.0</Version>
8+
<Version>2.3.1</Version>
99
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
1010
<Description>EZCode is a easy to ue programming language for WinForms and can help speed up your development process. Go to https://ez-code.web.app</Description>
1111
<Copyright>Copyright © 2023</Copyright>

EZCode/EZText.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class EZText
1919
/// </summary>
2020
public int CodeLine { get; set; } = 0;
2121
/// <summary>
22-
/// Static name for EZText Local Variable, "EZTEXT_GENERATED_VARIABLE_FOR_IF_SYNTAX___123"
22+
/// Static name for EZText Local Variable, "EZTEXT_GENERATED_VARIABLE"
2323
/// </summary>
24-
public static readonly string EZTEXT_Local_If_Var = "EZTEXT_GENERATED_VARIABLE_FOR_IF_SYNTAX___123";
24+
public static readonly string EZTEXT_Local_If_Var = "EZTEXT_GENERATED_VARIABLE";
2525
/// <summary>
2626
/// Errors in EZText
2727
/// </summary>
@@ -52,8 +52,7 @@ public string Translate(string InputCode, int _codeLine)
5252
try
5353
{
5454
CodeLine = _codeLine;
55-
InputCode = InputCode.Replace(".", "|");
56-
string[] lines = InputCode.Split(new[] { '\n', '|' }).Select(x => x.Trim()).Where(y => !y.Equals("")).Select(z=>z
55+
string[] lines = InputCode.Replace(".", "|").Split(new[] { '\n', '|' }).Select(x => x.Trim()
5756
.Replace("is not equal to", "!=")
5857
.Replace("is not", "!")
5958
.Replace("is equal to", "equals")
@@ -64,9 +63,9 @@ public string Translate(string InputCode, int _codeLine)
6463
.Replace("is less than", "<")
6564
.Replace(", then ", " then ")
6665
.Replace(" then ", " : ")
67-
.Replace("[p]", ".")
66+
.Replace("[P]", ".")
6867
.Replace("[SPACE]", " ")
69-
).ToArray();
68+
).Where(y => !y.Equals("")).ToArray();
7069
for (int i = 0; i < lines.Length; i++)
7170
{
7271
CodeLine++;
@@ -379,7 +378,7 @@ static EZText StaticTranslate(string line)
379378
}
380379
else
381380
{
382-
Error("Expected 'a' after create for syntax, 'Create a variable named name with the value X'", e);
381+
Error("Expected 'a' after create for syntax, 'Create a variable/list named name with the value X'", e);
383382
}
384383
}
385384
catch

EZ_IDE/EZText_To_EZCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private void Copy_Click(object sender, EventArgs e)
2525
private void Translate(object sender, EventArgs e)
2626
{
2727
EZText eztext = new EZText();
28-
OutputCode.Text = eztext.Translate(InputText.Text).Replace(EZText.EZTEXT_Local_If_Var, "EZText_Generated_Var");
28+
OutputCode.Text = eztext.Translate(InputText.Text);
2929
}
3030

3131
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)

0 commit comments

Comments
 (0)