dtr_core 0.12.1 → 0.12.3

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: f1d08e671686f002deb8379c32077c2049a81930748cc6a1836c9bea80e8ed39
4
- data.tar.gz: adcb40a8999cbbc23ba1ee48da7b29296437012b7dd9fcd4d31aabf70a1532c0
3
+ metadata.gz: 85ff3c49c332f69c8423696053b23021e14e3e4d4e1d6315d66d7c37cf0c689c
4
+ data.tar.gz: aff32475fdf033d0a7422d0ad5bd703012d227ecd66965aece8309cb0ec71d65
5
5
  SHA512:
6
- metadata.gz: 062a411d6c59d9e00a86b41059c7dbaccde844f9671259430b27136074c99131922581f58ba99ba0a96e60bd2c1cfe1768178e6d0b7d6c57e2225d4bd4878bea
7
- data.tar.gz: a7cb26e036aa3173a595c4ba65bcd6955e196e773af7da95756ef6cbfda0f63237517f06ec4ba7d2fca08d64c39f4ee0ef2ca1bea098d48b7e92364ca7265388
6
+ metadata.gz: 3320dcc5bfc8c2f17b5a46f9a3e1efd5e803983128bad0d28ca50666180546f7b7f1e79922208f362fd22797f61b6eb13608eb73885def8a52adc0d3843e7fbb
7
+ data.tar.gz: e8c767e6a7ad45cca0216b53aca9e0bc328ab4e69a2ca01c9317c8ef78aed7c98c8bdcb3a9bee2f8329264baf996b947e24c577aa4f2fc77c292c87811cd82b8
@@ -7,6 +7,7 @@ module DTRCore
7
7
  ## Instruction Categories ##
8
8
  INSTRUCTION_CATEGORY_BASIC = 'basic'
9
9
  INSTRUCTION_CATEGORY_BINARY = 'binary'
10
+ INSTRUCTION_CATEGORY_UNARY = 'unary'
10
11
  INSTRUCTION_CATEGORY_CONTROL_FLOW = 'control_flow'
11
12
  INSTRUCTION_CATEGORY_TERMINATING = 'terminating'
12
13
  INSTRUCTION_CATEGORY_LOGICAL = 'logical'
@@ -59,7 +60,11 @@ module DTRCore
59
60
  { name: 'multiply', description: 'assign to ASSIGN_NAME result of multiplying two value',
60
61
  category: INSTRUCTION_CATEGORY_BINARY },
61
62
  { name: 'divide', description: 'assign to ASSIGN_NAME result of dividing two value',
62
- category: INSTRUCTION_CATEGORY_BINARY }
63
+ category: INSTRUCTION_CATEGORY_BINARY },
64
+ { name: 'increment', description: 'set the first value to the .next() of the input value',
65
+ category: INSTRUCTION_CATEGORY_UNARY },
66
+ { name: 'unary', description: 'assign to ASSIGN_NAME result of unary operation on input value', category: INSTRUCTION_CATEGORY_UNARY },
67
+ { name: 'break', description: 'break out of loop', category: INSTRUCTION_CATEGORY_CONTROL_FLOW }
63
68
  ].freeze
64
69
 
65
70
  # Supported Types for DTR.
@@ -44,7 +44,7 @@ module DTRCore
44
44
  end
45
45
 
46
46
  def to_s
47
- "\t* (#{name})\n\t{\n#{@attributes.map { |x| "\t\t#{x[:name]}: #{x[:type]}" }.join("\n")}\n\t}"
47
+ "\t* (#{name})\n\t{\n#{@attributes.map { |x| "\t\t#{x['name']}: #{x['type']}" }.join("\n")}\n\t}"
48
48
  end
49
49
 
50
50
  def ==(other)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtr_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Durst
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
11
+ date: 2024-07-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |+
14
14
  Ruby gem serving as the reference implementation for the parsing and consumption of Digicus Textual Representation (DTR). We expect folks to leverage this gem when writing Digicus compiler plugins.