ascode 0.7.5 → 0.7.6

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: 55b5005bb2b50b12e824490f85db89b19eccb25825547258fd9fd18038d9a0ed
4
- data.tar.gz: 476800f77f0a55c541d469bb3981d82eee25e56e64d5caed79aea67413e98f4b
3
+ metadata.gz: 5ac385984ba838a833c3ad26512e28f89f39d414a35dbd63d436efcd81e9d7b8
4
+ data.tar.gz: 5a5a2176025f1b247412a9b7a863e388b44ae2db70bba93a6a92dafe6d4da2f7
5
5
  SHA512:
6
- metadata.gz: 6b4e014b12342f515ccf98e28a099641c09c73bd29261bae7d4cc561d3d1cb0cc0b054258d3efc9f470d9761083974ba90281b6db6c350cec8adc17ce88ec7ba
7
- data.tar.gz: 9e22b426e18b9870a929ccafd16d210efcb6a7ece813a377ac9fb0d8618fc84fea22e788a44d08cbd2294fcf26f1617866eb106556c9c3958b51046b2d3de705
6
+ metadata.gz: 2c23e311d0b45667fc8cc159212736eba6e560986123d8f3d3c904162211b5b6fbc54b053377fca26561a7b042b4fbb14d2bc445784e39a3cb99e5f180cb409a
7
+ data.tar.gz: c2d40c4bdd91ac2793a9800dab2b455c4c0bd4c55918036d3a7b4b6a23f8707723b32a201b3882742f9338bcfd9feabc03aac937527e60036399a43b48215f97
data/ascode.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = "ascode"
3
3
  s.authors = ["Artem Varaksa"]
4
4
 
5
- s.version = "0.7.5"
5
+ s.version = "0.7.6"
6
6
  s.date = Time.now.strftime("%Y-%m-%d")
7
7
 
8
8
  s.summary = "[β] Esoteric golfing language"
data/docs/functions.md CHANGED
@@ -38,6 +38,8 @@ Function|`pop`s|`push`es|Description
38
38
  `-`|`a`, `b`|`c`|`c` = `a` - `b`
39
39
  `/`|`a`, `b`|`c`|`c` = `a` / `b`
40
40
  `*`|`a`, `b`|`c`|`c` = `a` * `b`
41
+ `i`|`a`|`b`|`b` = `a` + `1`
42
+ `d`|`a`|`b`|`b` = `a` - `1`
41
43
  `>`|`a`, `b`|`c`|`c` = `1` if `a` > `b`, `0` otherwise
42
44
  `<`|`a`, `b`|`c`|`c` = `1` if `a` < `b`, `0` otherwise
43
45
  `=`|`a`, `b`|`c`|`c` = `1` if `a` = `b`, `0` otherwise
@@ -25,6 +25,16 @@ module Ascode
25
25
  env.push a * b
26
26
  end
27
27
 
28
+ def self.increment(env)
29
+ a = env.pop
30
+ push a + 1
31
+ end
32
+
33
+ def self.decrement(env)
34
+ a = env.pop
35
+ push a - 1
36
+ end
37
+
28
38
  def self.bigger_than(env)
29
39
  a = env.pop
30
40
  b = env.pop
@@ -45,6 +45,8 @@ module Ascode
45
45
  %w[- minus],
46
46
  %w[* multiply],
47
47
  %w[/ divide],
48
+ %w[i increment],
49
+ %w[d decrement],
48
50
  %w[> bigger_than],
49
51
  %w[< less_than],
50
52
  %w[= equal],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ascode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Varaksa