dtr_core 0.7.0 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0584cb1bf0567407eff28788610d660286408ccccf17e5843b1f72fd98d3f7d3'
4
- data.tar.gz: 5897559b0b36b5915e20d308e53d460f976284670430257026037a9b3cf8f2b3
3
+ metadata.gz: 19a8e9e136ddf241763741eab8b5c9c1e561dc585b01fc880e3569755b6ab7a9
4
+ data.tar.gz: 158427c0b5e4bc3cc9a50682d225cc0071984d2e7d86cc00c375b67ec5335fe9
5
5
  SHA512:
6
- metadata.gz: 6b5e437c961502e02ff53e97c9e3772913d266d803eb692292e31cafacfa91a26e1251e5c7cedfb18d7e23504f452f3b163037ef3a755bcec612f70c8120be9e
7
- data.tar.gz: 816d7449f668c9df06eef603a954fe78064d6afd5b03e4e00e5c69fbd782cff26a150e2ad957a79b314497637524e64531bb9ef2af37a18675f21ce888a5ac9f
6
+ metadata.gz: df4f33aac6008dc6c7b1ef616d1c35281f137127ef0d00ebc14bb643655755745b5aba94e1e7418c7914ddceb7134ebe3f314449321d6de02ccb76c20f339644
7
+ data.tar.gz: 8eaaf4063a3f1887a0d0a5c755a75875fa23f0d434af392f30ffdf9df2cde8e30984b5710b812c88ace2af240a21eaae42f266abd4b97f6f361b1d447ff69d1e
@@ -129,6 +129,8 @@ module DTRCore
129
129
  inputs_to_return.push(cur_word)
130
130
  cur_word = ''
131
131
  in_string = false
132
+ elsif char == ' ' && cur_word.empty?
133
+ next
132
134
  else
133
135
  cur_word += char
134
136
  end
@@ -20,11 +20,20 @@ module DTRCore
20
20
  end
21
21
 
22
22
  def to_s
23
- "{ instruction: #{instruction}," \
23
+ "{ instruction: #{instruction}, " \
24
24
  "input: (#{inputs&.join(', ')}), " \
25
25
  "assign: #{assign}, scope: #{scope} }"
26
26
  end
27
27
 
28
+ def to_json(*_args)
29
+ {
30
+ instruction:,
31
+ inputs:,
32
+ assign:,
33
+ scope:
34
+ }.to_json
35
+ end
36
+
28
37
  def valid?
29
38
  DTRCore::InstructionValidator.new(self).valid?
30
39
  end
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.7.0
4
+ version: 0.7.2
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-06-21 00:00:00.000000000 Z
11
+ date: 2024-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Core smart contract intermediate language (Digicus Textual Representation)
14
14
  parser.