repeat until

java11
Sandy Brownlee 2 years ago
parent 64c25f1486
commit c3c2076d9e
  1. 6
      Triangle.Compiler/src/test/java/triangle/syntacticAnalyser/TestScanner.java
  2. 15
      programs/pounddemo.tri
  3. 14
      programs/repeatuntil.tri

@ -37,6 +37,12 @@ public class TestScanner {
compileExpectFailure("/pounddemo.tri");
}
@Test
public void testRepeatUntil() {
compileExpectFailure("/repeatuntil.tri");
}
private void compileExpectSuccess(String filename) {

@ -1,15 +0,0 @@
! this won't work until after some work in the practicals
let
var a : Integer;
var b : Integer
in
begin
a := 1;
b := 2;
putint(a)
putint(b)
putint(£a)
putint(£b)
end

@ -0,0 +1,14 @@
! this won't work until after some lab work
let
var a : Integer
in
begin
a := 0;
repeat
begin
put('a');
a := a + 1;
end
until a < 5
end