about summary refs log tree commit diff stats
path: root/js/scripting-lang/tests/01_lexer_basic.txt
blob: bdf73979cafc94b0895fc42fc0ea1d1f43920943 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Unit Test: Basic Lexer Functionality */
/* Tests: Numbers, identifiers, operators, keywords */

/* Test numbers */
x : 42;
y : 3.14;
z : 0;

/* Test identifiers */
name : "test";
flag : true;
value : false;

/* Test basic operators */
sum : x + y;
diff : x - y;
prod : x * y;
quot : x / y;

/* Test keywords */
result : case x of
    42 : "correct"
    _ : "wrong";

..out "Lexer basic test completed";