dtr_to_rust 0.13.0 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code_generator.rb +1 -1
- data/lib/soroban_rust_backend.rb +25 -25
- 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: 0666a8051d639b4c24ad1a9808718ad9bd50fa31daae67c1089b8fff80ac9aa5
|
4
|
+
data.tar.gz: 89638c1b4fb12d91fc927b7d81a8630d21217dcc4f79118a46a5f696ea3279ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28aa249428173393a0ced355090cbae716dca31f96c1ff7035db7b4917d092ec6405c9b44eef070c77202c559b36804287c4cba4ad5855c59e7fe4ac8c2d9a12
|
7
|
+
data.tar.gz: 59600afdff5758b45948c721abd81c5486601ccae9e3db3f74edfef919a57557851b89d417363ef6f8485a37928417b5a71343ab641ce887fb8769af8529a582
|
data/lib/code_generator.rb
CHANGED
@@ -25,7 +25,7 @@ module SorobanRustBackend
|
|
25
25
|
|
26
26
|
return_string << "#{' ' * indentation}#{InstructionHandler.new(instruction, y[2]).generate_rust}\n"
|
27
27
|
|
28
|
-
if instruction.instruction == 'exit_with_message' && instruction.scope != 0
|
28
|
+
if (instruction.instruction == 'exit_with_message' || instruction.instruction == 'return' || instruction.instruction == 'goto') && instruction.scope != 0
|
29
29
|
jump_back_indent = indentation - 1
|
30
30
|
return_string << "#{' ' * jump_back_indent}}\n"
|
31
31
|
end
|
data/lib/soroban_rust_backend.rb
CHANGED
@@ -12,39 +12,39 @@ module SorobanRustBackend
|
|
12
12
|
|
13
13
|
# This module contains all the classes that handle the different types of instructions.
|
14
14
|
module Instruction
|
15
|
-
autoload :Evaluate, '
|
16
|
-
autoload :Field, '
|
17
|
-
autoload :Handler, '
|
18
|
-
autoload :Print, '
|
19
|
-
autoload :Return, '
|
20
|
-
autoload :InstantiateObject, '
|
21
|
-
autoload :Add, '
|
22
|
-
autoload :Subtract, '
|
23
|
-
autoload :Multiply, '
|
24
|
-
autoload :Divide, '
|
25
|
-
autoload :Assign, '
|
26
|
-
autoload :Jump, '
|
27
|
-
autoload :Goto, '
|
28
|
-
autoload :ExitWithMessage, '
|
29
|
-
autoload :And, '
|
30
|
-
autoload :Or, '
|
31
|
-
autoload :EndOfIterationCheck, '
|
32
|
-
autoload :Increment, '
|
33
|
-
autoload :TryAssign, '
|
34
|
-
autoload :Break, '
|
35
|
-
autoload :BinaryInstruction, '
|
15
|
+
autoload :Evaluate, 'instruction/evaluate'
|
16
|
+
autoload :Field, 'instruction/field'
|
17
|
+
autoload :Handler, 'instruction/handler'
|
18
|
+
autoload :Print, 'instruction/print'
|
19
|
+
autoload :Return, 'instruction/return'
|
20
|
+
autoload :InstantiateObject, 'instruction/instantiate_object'
|
21
|
+
autoload :Add, 'instruction/add'
|
22
|
+
autoload :Subtract, 'instruction/subtract'
|
23
|
+
autoload :Multiply, 'instruction/multiply'
|
24
|
+
autoload :Divide, 'instruction/divide'
|
25
|
+
autoload :Assign, 'instruction/assign'
|
26
|
+
autoload :Jump, 'instruction/jump'
|
27
|
+
autoload :Goto, 'instruction/goto'
|
28
|
+
autoload :ExitWithMessage, 'instruction/exit_with_message'
|
29
|
+
autoload :And, 'instruction/and'
|
30
|
+
autoload :Or, 'instruction/or'
|
31
|
+
autoload :EndOfIterationCheck, 'instruction/end_of_iteration_check'
|
32
|
+
autoload :Increment, 'instruction/increment'
|
33
|
+
autoload :TryAssign, 'instruction/try_assign'
|
34
|
+
autoload :Break, 'instruction/break'
|
35
|
+
autoload :BinaryInstruction, 'instruction/binary_instruction'
|
36
36
|
end
|
37
37
|
|
38
38
|
module Common
|
39
|
-
autoload :TypeTranslator, '
|
40
|
-
autoload :InputInterpreter, '
|
39
|
+
autoload :TypeTranslator, 'common/type_translator'
|
40
|
+
autoload :InputInterpreter, 'common/input_interpreter'
|
41
41
|
end
|
42
42
|
|
43
43
|
module NonTranslatables
|
44
|
-
autoload :Handler, '
|
44
|
+
autoload :Handler, 'non_translatables/handler'
|
45
45
|
end
|
46
46
|
|
47
47
|
module ContractState
|
48
|
-
autoload :Handler, '
|
48
|
+
autoload :Handler, 'contract_state/handler'
|
49
49
|
end
|
50
50
|
end
|