mirror of
https://github.com/Ed94/LangStudies.git
synced 2025-09-06 02:29:26 -07:00
Made a UI for results, BAPFS - Lecture 4, 5, and 6 done.
This commit is contained in:
8
Editor/Tests/1.Multi-Statement.uf
Normal file
8
Editor/Tests/1.Multi-Statement.uf
Normal file
@@ -0,0 +1,8 @@
|
||||
// Testing a comment
|
||||
"Hello World!";
|
||||
|
||||
/**
|
||||
*
|
||||
* Testing a comment
|
||||
*/
|
||||
42;
|
18
Editor/Tests/2.BlockStatement.uf
Normal file
18
Editor/Tests/2.BlockStatement.uf
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
42;
|
||||
"Hello World!";
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
42;
|
||||
{
|
||||
"Hello World!";
|
||||
}
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
7
Editor/Tests/3.BinaryExpression.uf
Normal file
7
Editor/Tests/3.BinaryExpression.uf
Normal file
@@ -0,0 +1,7 @@
|
||||
// Binary expression
|
||||
2 + 2;
|
||||
|
||||
// Nested binary expressions:
|
||||
// left : 3 + 2
|
||||
// right : 2
|
||||
3 + 2 - 2;
|
5
Editor/Tests/4.Assignment.uf
Normal file
5
Editor/Tests/4.Assignment.uf
Normal file
@@ -0,0 +1,5 @@
|
||||
// Single
|
||||
x = 42;
|
||||
|
||||
// Chained
|
||||
x = (y = 42);
|
8
Editor/Tests/5.Conditionals.uf
Normal file
8
Editor/Tests/5.Conditionals.uf
Normal file
@@ -0,0 +1,8 @@
|
||||
if (x)
|
||||
{
|
||||
x = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 2;
|
||||
}
|
1
Editor/Tests/6.Relations.uf
Normal file
1
Editor/Tests/6.Relations.uf
Normal file
@@ -0,0 +1 @@
|
||||
x > 0;
|
8
Editor/Tests/7.VariableDeclaration.uf
Normal file
8
Editor/Tests/7.VariableDeclaration.uf
Normal file
@@ -0,0 +1,8 @@
|
||||
// Declaration
|
||||
let x;
|
||||
|
||||
// Single assignment declaration
|
||||
let y = 42;
|
||||
|
||||
// Multiple declarations
|
||||
let a, b;
|
Reference in New Issue
Block a user