Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/lang/test.Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
test: # {{CONTEXT}}



echo "Hello {{CURSOR}}"

55 changes: 31 additions & 24 deletions test/lang/test.adb
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
with Ada.Text_IO; use Ada.Text_IO;

package Week is
-- {{TEST}}
package Week is -- {{CONTEXT}}

Mon : constant String := "Monday";
Tue : constant String := "Tuesday";
Wed : constant String := "Wednesday";
Thu : constant String := "Thursday";
Fri : constant String := "Friday";
Sat : constant String := "Saturday";
Sun : constant String := "Sunday";
Sun : constant String := "Sunday"; -- {{CURSOR}}



end Week;

package Months
-- {{TEST}}
package Months -- {{CONTEXT}}
is

Jan : constant String := "January";
Feb : constant String := "February";
Feb : constant String := "February"; -- {{CURSOR}}



Expand All @@ -31,93 +33,98 @@ is

end Months;

procedure Show_Increment is
-- {{TEST}}
procedure Show_Increment is -- {{CONTEXT}}
A, B, C : Integer;

procedure Display_Result is
procedure Display_Result is -- {{CONTEXT}}
begin
Put_Line ("Increment of "
& Integer'Image (A)
& " with "
& Integer'Image (B)
& " is "
& Integer'Image (C));
& Integer'Image (C)); -- {{CURSOR}}


end Display_Result;

-- {{POPCONTEXT}}
begin
A := 10;
B := 3;
C := Increment_By (A, B);
Display_Result;
A := 20;
B := 5;
C := Increment_By (A, B);
C := Increment_By (A, B); -- {{CURSOR}}
Display_Result;
end Show_Increment;


type Date is
-- {{TEST}}
type Date is -- {{CONTEXT}}
record
Day : Integer range 1 .. 31;

Month : Months := Jan;




-- {{CURSOR}}
end record;

procedure Greet is
-- {{TEST}}
procedure Greet is -- {{CONTEXT}}
begin

X := 2;

Ada.Text_IO.Put_Line ("Hello");


for N in 1 .. 5 loop
for N in 1 .. 5 loop -- {{CONTEXT}}


Put_Line("Hi");


-- {{CURSOR}}
end loop;

-- {{POPCONTEXT}}
Y := 1;
loop
loop -- {{CONTEXT}}


exit when Y = 5;


-- {{CURSOR}}
end loop;

while Y >= 0 loop
-- {{POPCONTEXT}}
while Y >= 0 loop -- {{CONTEXT}}
Y := Y - 1;




-- {{CURSOR}}
end loop;



case Y is
-- {{POPCONTEXT}}
case Y is -- {{CONTEXT}}
when 0 .. 10 =>
Put_Line("foo");



when others =>
Put_Line("bar");
Put_Line("bar"); -- {{CURSOR}}
end case;

end Greet;


function Foo
-- {{TEST}}
function Foo -- {{CONTEXT}}
(I : Integer := 0;)
return Integer is
begin
Expand All @@ -126,7 +133,7 @@ begin



return I + 1;
return I + 1; -- {{CURSOR}}
end Foo;


Expand Down
14 changes: 8 additions & 6 deletions test/lang/test.apex
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
// {{TEST}}
public class MyClass {





public void my_method(Integer param) {
public void my_method(Integer param) { // {{CONTEXT}}




if (true) {
if (true) { // {{CONTEXT}}




for (Integer i = 0; i < 10; i++) {
for (Integer i = 0; i < 10; i++) { // {{CONTEXT}}




for (Integer v : values) {
for (Integer v : values) { // {{CONTEXT}}




System.
System. // {{CONTEXT}}



debug('a message');
debug('a message'); // {{CURSOR}}
}
}
}
}
}
// vim: ft=apex
Loading
Loading