dtr_core 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dtr_core/supported_attributes.rb +12 -1
- 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: 567cfc936d95095b577f5f92b9e07328c3b3225186d40bb3d04bc0e2d678eaa6
|
4
|
+
data.tar.gz: f01122597f91ecc1db9c108a2effa96ac734a318dde48f14e54441bf10e31ced
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e05a81b1d527c88bd2e5b172b662d12a12519ce85d6aa7648a66360160c32a47bb1ab5df6176d44a2d70af69c5ea761056da3ce23b979d32212801fa39c1396
|
7
|
+
data.tar.gz: ea2f450d0a1873f217797dc1021ffe62778189d3c16df20c04038d7c3c9f715728223389dedd3c6a267e0f322d1263337a31d580e25a874d914699c2afdc217e
|
@@ -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 },
|
@@ -51,6 +56,12 @@ module DTRCore
|
|
51
56
|
# object operations
|
52
57
|
{ name: 'field', description: 'Reference an object field.', category: INSTRUCTION_CATEGORY_OBJECTS },
|
53
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.
|