dtr_core 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee072b6dce36bea6dc63d4c72d16021b519846088a3a9e2300dee4ad94e5183e
4
- data.tar.gz: c27c0898e590ce11f2b592764e7ab8deaf91c3a4b190085aa314b22c5fcf24ff
3
+ metadata.gz: 567cfc936d95095b577f5f92b9e07328c3b3225186d40bb3d04bc0e2d678eaa6
4
+ data.tar.gz: f01122597f91ecc1db9c108a2effa96ac734a318dde48f14e54441bf10e31ced
5
5
  SHA512:
6
- metadata.gz: 6621c3c36a912547bf75c8d9b49bac6c851fa64dfd9c2852a7b0c37fc7c583a18e130bc10030fbc710eae38768e72b2eb8e3ee1c84ea418497d599473564ae14
7
- data.tar.gz: 397ac9609eab13ab3e2aa8b9d5d172b25cb207276f2bbbc5ae93950d5b16ccdff83089d4e52e168ea366a61d3b93c9a8428e72a43a9050f5815d88320e7acdce
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtr_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Durst