Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaba committed Nov 14, 2023
1 parent 1d34e63 commit 5fac641
Show file tree
Hide file tree
Showing 22 changed files with 529 additions and 193 deletions.
59 changes: 40 additions & 19 deletions bin/Debug/netcoreapp3.1/BaseTest/ForWhileTest.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@ ForWhileTest
{
static Fun()
{
forfun()
#whilefun()
#forfun()
whilefun()
}
enum EItType
{
It1 = 1
It2 = 2
}
static forfun()
{
#!
i = 20
for
for i = 1
{
if i > 22
{
break
}
CSharp.System.Console.WriteLine("for{} i= $i ")
i = i+2
CSharp.System.Console.WriteLine("for i= $i ")
}
#!
for i = 123
{
if i >= 130
Expand Down Expand Up @@ -52,39 +58,53 @@ ForWhileTest
if n % 2 == 0 {CSharp.System.Console.WriteLine("这是一个偶数 = $i ");continue }
}
!#
#!
#! 暂不支持 List,Map,Set,Queue,Link
int i2 = 0;
List list = List();
for it in list
{

}

Array arr = [1,2,3];
for v in a{
System.Console.Write(" v= $v ")
}
Array b = [{a=1}, {a=2}, {a = 3} ];

!#
#! 暂不支持Array<int>
Array<int> arr = [1,2,3];
for v in arr{
CSharp.System.Console.Write(" v= $v ")
}
!#
#! 暂不支持 Array<object>
Array b = [{a=1}, {a=2}, {a = 3} ];
for v in b{

}
}
暂不支持 for in range
for v in 1..10
{
}
暂不支持 for in range
for v in EItType
{

}
!#
}
static whilefun()
{
int i = 0;
while i < 30
while i < 14
{
#CSharp.System.Console.Write(" i= $i ");
if( i == 5 ){continue;}
i++
if( i == 5 ){
continue;}
if i > 10{ break;}
i++;
CSharp.System.Console.WriteLine(" ioooo = $i ");
}
#!
i = 10
while
{

}
while true{ m = 20; break;}
while true{ m = 20;}
i = 30;
dowhile i < 20
Expand All @@ -97,5 +117,6 @@ ForWhileTest
m = 20;
}
while true { i+= 20; if i == 20{ break; } }
!#
}
}
Binary file modified bin/Debug/netcoreapp3.1/SimpleLanguage.dll
Binary file not shown.
Binary file modified bin/Debug/netcoreapp3.1/SimpleLanguage.exe
Binary file not shown.
Binary file modified bin/Debug/netcoreapp3.1/SimpleLanguage.pdb
Binary file not shown.
4 changes: 2 additions & 2 deletions source/Compile/FileMeta/FileMetaExpress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,12 @@ public override string ToFormatString()
return sb.ToString();
}
}
public class FileMetaSwitchSyntaxTerm : FileMetaBaseTerm
public class FileMetaMatchSyntaxTerm : FileMetaBaseTerm
{
public FileMetaKeySwitchSyntax switchSyntax => m_SwitchSyntax;

private FileMetaKeySwitchSyntax m_SwitchSyntax = null;
public FileMetaSwitchSyntaxTerm(FileMeta fm, FileMetaKeySwitchSyntax _switchSyntax)
public FileMetaMatchSyntaxTerm(FileMeta fm, FileMetaKeySwitchSyntax _switchSyntax)
{
m_FileMeta = fm;
m_SwitchSyntax = _switchSyntax;
Expand Down
Loading

0 comments on commit 5fac641

Please sign in to comment.