dtr_core 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dtr_core/supported_attributes.rb +13 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87ca88cd269d52251ab32a7923f88e8f5735d68880d0bdc45cfd086daf42de47
|
4
|
+
data.tar.gz: de67b7404af976d585ed6f12a76498fb3ee78bfdea6c63dc57d0690fedf715ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59f317f81005ca77ca7be6a96cf32a198dffcdae77d902ac2574819cf86e3119598384b9d3de870db3a59050d5a7818161db7f8cf062fef0a2e5f03d9c866a97
|
7
|
+
data.tar.gz: d5809868886625e7c8b7884fd6f6b0e4a29ee7106e1e54ef56291ee27be307cd4126e29aac2dfc2c74aa0c0a946d92c9e1d3b0826d371c99c15c3acc3771c423
|
@@ -12,6 +12,8 @@ module DTRCore
|
|
12
12
|
INSTRUCTION_CATEGORY_ENVIRONMENT = 'environment'
|
13
13
|
INSTRUCTION_CATEGORY_METHODS = 'methods'
|
14
14
|
INSTRUCTION_CATEGORY_OBJECTS = 'objects'
|
15
|
+
INSTRUCTION_CATEGORY_CONDITIONAL = 'conditional'
|
16
|
+
INSTRUCTION_CATEGORY_LOGICAL = 'logical'
|
15
17
|
INSTRUCTION_CATEGORIES = [
|
16
18
|
INSTRUCTION_CATEGORY_BASIC,
|
17
19
|
INSTRUCTION_CATEGORY_STATE,
|
@@ -20,13 +22,16 @@ module DTRCore
|
|
20
22
|
INSTRUCTION_CATEGORY_STRING,
|
21
23
|
INSTRUCTION_CATEGORY_ENVIRONMENT,
|
22
24
|
INSTRUCTION_CATEGORY_METHODS,
|
23
|
-
INSTRUCTION_CATEGORY_OBJECTS
|
25
|
+
INSTRUCTION_CATEGORY_OBJECTS,
|
26
|
+
INSTRUCTION_CATEGORY_CONDITIONAL,
|
27
|
+
INSTRUCTION_CATEGORY_LOGICAL
|
24
28
|
].freeze
|
25
29
|
## Instructions ##
|
26
30
|
INSTRUCTIONS = [
|
27
31
|
# basic operations
|
28
32
|
{ name: 'return', description: 'Return a value from a function.', category: INSTRUCTION_CATEGORY_BASIC },
|
29
33
|
{ name: 'assign', description: 'Assign a value to a variable.', category: INSTRUCTION_CATEGORY_BASIC },
|
34
|
+
{ name: 'panic', description: 'Exit, quickly, and loudly.', category: INSTRUCTION_CATEGORY_BASIC },
|
30
35
|
# state operations
|
31
36
|
{ name: 'fetch_state', description: 'Fetch a value from the state.', category: INSTRUCTION_CATEGORY_STATE },
|
32
37
|
{ name: 'save_state', description: 'Save a value to the state.', category: INSTRUCTION_CATEGORY_STATE },
|
@@ -50,7 +55,13 @@ module DTRCore
|
|
50
55
|
category: INSTRUCTION_CATEGORY_METHODS },
|
51
56
|
# object operations
|
52
57
|
{ name: 'field', description: 'Reference an object field.', category: INSTRUCTION_CATEGORY_OBJECTS },
|
53
|
-
{ name: 'initialize_udt', description: 'Instantiate UDT object.', category: INSTRUCTION_CATEGORY_OBJECTS }
|
58
|
+
{ name: 'initialize_udt', description: 'Instantiate UDT object.', category: INSTRUCTION_CATEGORY_OBJECTS },
|
59
|
+
# conditional operations
|
60
|
+
{ name: 'conditional_jump', description: 'Jump to a label if first input is true.', category: INSTRUCTION_CATEGORY_CONDITIONAL },
|
61
|
+
{ name: 'unconditional_jump', description: 'Jump to a no matter what.', category: INSTRUCTION_CATEGORY_CONDITIONAL },
|
62
|
+
# logical operations
|
63
|
+
{ name: 'and', description: 'Logical AND.', category: INSTRUCTION_CATEGORY_LOGICAL },
|
64
|
+
{ name: 'or', description: 'Logical OR.', category: INSTRUCTION_CATEGORY_LOGICAL }
|
54
65
|
].freeze
|
55
66
|
|
56
67
|
# Supported Types for DTR.
|