Add for parsing to parser test
This commit is contained in:
@@ -72,6 +72,8 @@ testString (test,
|
||||
- [ifElse]:Int = if true then 4 else 5
|
||||
- [dangleElse]:Int = if true then if false then 3 else 5
|
||||
- [loop]:Int = {i:Int=0 if [< i 3] then return 1 loop {[print 3] if [> i 3] then break 0 i=[++ i]}}
|
||||
- [for s:String] = for i:Index e:Byte in str if [> i 3] then [break e]
|
||||
- [for s:String] = for e:Byte in s [break e]
|
||||
- [matchToInt u:(| Int F64)]:Int = match u | u:Int u | u:F64 [~ Int u]`,
|
||||
// input
|
||||
`
|
||||
@@ -118,6 +120,10 @@ testString (test,
|
||||
i = [++ i]
|
||||
}
|
||||
}
|
||||
[for s:String] = for i:Index e:Byte in str
|
||||
if [> i 3] then [break e]
|
||||
[for s:String] = for e:Byte in s
|
||||
[break e]
|
||||
[matchToInt u:(| Int F64)]:Int = match u
|
||||
| u:Int u
|
||||
| u:F64 [~Int u]
|
||||
|
||||
Reference in New Issue
Block a user