Skip to content

Commit 5b8b967

Browse files
Merge pull request #120 from code0-tech/104-if-else
If and If-Else
2 parents 43f8936 + 628d729 commit 5b8b967

File tree

4 files changed

+198
-1
lines changed

4 files changed

+198
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"variant": "NODE",
3+
"identifier": "RUNNABLE",
4+
"name": [
5+
{
6+
"code": "en-US",
7+
"content": "Node"
8+
}
9+
],
10+
"rules": [],
11+
"genericKeys": []
12+
}

definitions/standard/runtime_definition/control/control-audit.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,10 @@
1111
16.10.2025
1212

1313
## Renamed
14-
break -> stop
14+
break -> stop
15+
16+
01.11.2025
17+
18+
## Added
19+
- if
20+
- if-else
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"runtimeName": "std::control::if",
3+
"runtimeParameterDefinitions": [
4+
{
5+
"dataTypeIdentifier": {
6+
"dataTypeIdentifier": "BOOLEAN"
7+
},
8+
"runtimeName": "condition",
9+
"defaultValue": null,
10+
"name": [
11+
{
12+
"code": "en-US",
13+
"content": "Condition"
14+
}
15+
],
16+
"description": [
17+
{
18+
"code": "en-US",
19+
"content": "Boolean condition to evaluate."
20+
}
21+
],
22+
"documentation": [
23+
{
24+
"code": "en-US",
25+
"content": "Specifies the condition that determines whether the provided runnable should be executed. If this condition evaluates to true, the execution proceeds with the runnable defined in the second parameter."
26+
}
27+
]
28+
},
29+
{
30+
"dataTypeIdentifier": {
31+
"dataTypeIdentifier": "RUNNABLE"
32+
},
33+
"runtimeName": "then_runnable",
34+
"defaultValue": null,
35+
"name": [
36+
{
37+
"code": "en-US",
38+
"content": "Then Runnable"
39+
}
40+
],
41+
"description": [
42+
{
43+
"code": "en-US",
44+
"content": "Runnable to execute when the condition is true."
45+
}
46+
],
47+
"documentation": [
48+
{
49+
"code": "en-US",
50+
"content": "Defines the runnable that runs if the condition evaluates to true."
51+
}
52+
]
53+
}
54+
],
55+
"returnTypeIdentifier": null,
56+
"throwsError": false,
57+
"genericKeys": [],
58+
"name": [
59+
{
60+
"code": "en-US",
61+
"content": "If"
62+
}
63+
],
64+
"description": [
65+
{
66+
"code": "en-US",
67+
"content": "Executes the specified runnable if the condition evaluates to true."
68+
}
69+
],
70+
"documentation": [
71+
{
72+
"code": "en-US",
73+
"content": "The 'If' runnable evaluates a boolean condition and, if it is true, executes the provided runnable. If the condition is false, execution continues without running the runnable. This behavior corresponds to a standard 'if' statement in programming languages."
74+
}
75+
],
76+
"deprecationMessage": []
77+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"runtimeName": "std::control::if_else",
3+
"runtimeParameterDefinitions": [
4+
{
5+
"dataTypeIdentifier": {
6+
"dataTypeIdentifier": "BOOLEAN"
7+
},
8+
"runtimeName": "condition",
9+
"defaultValue": null,
10+
"name": [
11+
{
12+
"code": "en-US",
13+
"content": "Condition"
14+
}
15+
],
16+
"description": [
17+
{
18+
"code": "en-US",
19+
"content": "Boolean condition to evaluate."
20+
}
21+
],
22+
"documentation": [
23+
{
24+
"code": "en-US",
25+
"content": "Determines which branch to execute. If true the Then Runnable runs otherwise the Else Runnable runs."
26+
}
27+
]
28+
},
29+
{
30+
"dataTypeIdentifier": {
31+
"dataTypeIdentifier": "RUNNABLE"
32+
},
33+
"runtimeName": "then_runnable",
34+
"defaultValue": null,
35+
"name": [
36+
{
37+
"code": "en-US",
38+
"content": "Then Runnable"
39+
}
40+
],
41+
"description": [
42+
{
43+
"code": "en-US",
44+
"content": "Runnable to execute when the condition is true."
45+
}
46+
],
47+
"documentation": [
48+
{
49+
"code": "en-US",
50+
"content": "Defines the runnable that runs if the condition evaluates to true."
51+
}
52+
]
53+
},
54+
{
55+
"dataTypeIdentifier": {
56+
"dataTypeIdentifier": "RUNNABLE"
57+
},
58+
"runtimeName": "else_runnable",
59+
"defaultValue": null,
60+
"name": [
61+
{
62+
"code": "en-US",
63+
"content": "Else Runnable"
64+
}
65+
],
66+
"description": [
67+
{
68+
"code": "en-US",
69+
"content": "Runnable to execute when the condition is false."
70+
}
71+
],
72+
"documentation": [
73+
{
74+
"code": "en-US",
75+
"content": "Defines the runnable that runs if the condition evaluates to false."
76+
}
77+
]
78+
}
79+
],
80+
"returnTypeIdentifier": null,
81+
"throwsError": false,
82+
"genericKeys": [],
83+
"name": [
84+
{
85+
"code": "en-US",
86+
"content": "If-Else"
87+
}
88+
],
89+
"description": [
90+
{
91+
"code": "en-US",
92+
"content": "Evaluates a condition and executes either the Then Runnable or the Else Runnable."
93+
}
94+
],
95+
"documentation": [
96+
{
97+
"code": "en-US",
98+
"content": "Evaluates a boolean condition. If true, executes the Then Runnable; otherwise, executes the Else Runnable. Mirrors a standard 'if/else' control structure in programming languages."
99+
}
100+
],
101+
"deprecationMessage": []
102+
}

0 commit comments

Comments
 (0)