-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_script.ds
62 lines (56 loc) · 1.56 KB
/
example_script.ds
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// this is a comment
/* this is also a comment */
// Scheduled Block 0
<<timedMethod{5};>Flag1>
// Scheduled Block 1
<<anotherTimedMethod{5};>Flag2>
// Scheduled Block 2
<Flag1,Flag2<
int int16VarDefault = 1;
int8 int8Var = 2;
int16 int16Var = 3;
int32 int32Var = 4;
int64 int64Var = 5;
uint uint16VarDefault = 6;
uint8 uint8Var = 7;
uint16 uint16Var = 8;
uint32 uint32Var = 9;
uint64 uint64Var = 10;
char charVar = 'c';
float float32VarDefault = 12F;
float32 float32Var = 13f;
float64 float64Var = 16d;
string stringVar = "string literal with \\ escapes \n";
bool boolVar = true || false;
bool[] arrayVar = namespace::thing.boolArray;
namespace::randomGenericType<uint, namespace::someType>
generic_type_variable_with_underscores = namespace::instanceOfRandomGenericType;
AMapOfSomeSort<string, int> aMap = namespace::instanceOfAMapOfSomeSort;
if (uint16Var == 10 && globalFunction() || "string literal without escapes" .. "concat string" == stringVar)
{
generic_type_variable_with_underscores.someFunction();
}
int timedMethodReturnValue = namespace::nestedNamespace::someClass.timedMethodThatReturnsAnInt{};
bool aBool = arrayVar[10];
string valueFromMap = aMap["key"];
namespace::type untimedFunctionReturnValue = untimedFunction();
>Flag3>
// Scheduled Block 3
<Flag3<>Flag4>
// Scheduled Block 4
<Flag4<
bool WeDidIt = true;
// This is meant to test out operator precedence
if (a = b ? c : d || e && f | g ^ h & i == j > k >> l + m * n .. o[1]()++)
{
switch (test)
{
case a:
test();
break;
default:
test();
break;
}
}
>>