BAPFS Lecture 13

This commit is contained in:
Edward R. Gonzalez 2022-07-12 02:47:32 -04:00
parent 948974857a
commit 6832deb5ad
4 changed files with 1091 additions and 3 deletions

View File

@ -0,0 +1,32 @@
// While Statement
while ( x > 10 )
{
x -= 1;
}
// Do-While Statement
do
{
y -= 1;
}
while ( y > 10 );
// For Statement
for (let index = 0; index < 10; index += 1)
{
x += index;
}
// For Statement (Optionals)
for (;;)
{}
for (let index = 0, z = 12; index < 10; index += 1)
{
x += index;
}
for (index = 0; index < 10; index += 1)
{
x += index;
}

File diff suppressed because it is too large Load Diff

View File

@ -44,8 +44,8 @@ const TokenType = \
const TokenSpec = \
{
# Comments
TokenType.CommentLine : "^\/\/.*",
TokenType.CommentMultiLine : "^\/\\*[\\s\\S]*?\\*\\/",
TokenType.CommentLine : "^\\/\\/.*",
TokenType.CommentMultiLine : "^\\/\\*[\\s\\S]*?\\*\\/",
# Formatting
TokenType.Whitespace : "^\\s+",

View File

@ -18,7 +18,7 @@ config/icon="res://Assets/Branding/RDP_Class_cover_small.png"
[autoload]
GScene="*res://Lectures/Lecture.tscn"
GScript="*res://Lectures/Lecture.12.gd"
GScript="*res://Lectures/Lecture.13.gd"
[gui]