Rhyme Language

Rhyme Language

1 Directives

// The following directive is ignored:
//#language english
#language french

1.1 Important Security point regarding directives

2 Blocks

Example:

[block]
[block]
[my-block]

2.1 Passing Arguments into Blocks

[summer-registration $name]
.text "Hello, $name!"

2.2 Navigating between blocks

2.3 Special blocks in Rhyme

2.3.1 Initialization Block

To illustrate, with the following rhyme code:

$foo = "bar"

[start]
.text $foo

The $foo = "bar" line is automatically part of the [init] block.

The following code is equivalent to the above:

[init]
$foo = "bar"

[start]
.text $foo
2.3.2 Start Block

Example:

[start]
.text "Hello, world!"

3 Comments

Example:

// This is a line comment
$age = 10; // This is a comment after a line of code

4 Colors in Rhyme

Example:

// This will display the text in red
.text "Hello, world!" #red

4.1 Advanced Color Topics

4.2 Example Color Definitions

4.3 Base Colors

The following built-in or base colors are defined for rhyme:

4.4 Color Hues for built-in colors

Examples:

5 Variables

5.1 Variable Name Examples

$foo = "bar"

5.2 Examples of invalid variable names

myvar // MUST start with a $
$1  // cannot start with a number
$My-var // should not have capital letters
$my var // cannot not have spaces
$myvar! // should not have special characters

5.3 Number Variables

5.4 Text Variables

6 Literal types in Rhyme