alphalang 0.2.5 β†’ 0.2.6

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: 8f0ae223746d2a819889026bde1c6ec27b0d331567aa0734fdbbc824b45d4625
4
- data.tar.gz: d3b0e9a67edcd936217b50d931c3993ab32c5c8efca805cb1dfbe0a6b260fa3e
3
+ metadata.gz: 6dbe6c0cb099f96c68feadb26492b409cdb71d2db52fd5e6436a6c142d273584
4
+ data.tar.gz: 215b6ea3d011610dbdb3d2021025c29361df8d6cc4dba74a7a8dabf0d7596fdb
5
5
  SHA512:
6
- metadata.gz: 5022eaae630f0fbc43485f5b5bf3d55e3c0bcc577818edc2f2aeb209f2f323ca233c2ae6d015f296a47caf45c5958626f5d69a6be9e8100fdf3b104f48ab2571
7
- data.tar.gz: ae51f1d99f90e029b9a2569dd5cb3bb78c48f06bb080781b0c5a3631d05433d922eb990790f2a985dd0435fe4461f98cbbb1004e7b47e40399574271f96929b6
6
+ metadata.gz: c99ce78b496f2eb91ddb26c799fe51e18e5fb0f2d23d546fcadff0cc7a293c28af455ecad577d43b1e9c4e156f781d17b9ba4b4f7f856861158b68301c23ef77
7
+ data.tar.gz: d6fd552131866752356ce35a82c1ce032dc1863597b1ba618e9f9924fc1d9c2c86a8e595fe64358757156150125ba937350bd422e5818f77f453be9be0882a1a
data/bin/alphalang CHANGED
@@ -5,7 +5,7 @@ require_relative '../lib/rdparse'
5
5
  ALPHA_VER = '0.1.5'.freeze
6
6
  ABORT_ANSWERS = [' ', '', 'none', 'abort'].freeze
7
7
  LOCALES_PATH = File.join(__dir__, '../lib/locales')
8
- PROTECTED_LOCALES = ['.', '..', 'locale_template', 'default', 'default.old', 'en', 'sv', 'de'].freeze
8
+ PROTECTED_LOCALES = ['.', '..', 'locale_template', 'default', 'default.old', 'en', 'sv', 'de', 'emoji'].freeze
9
9
 
10
10
  basic_error_msg = "Usage: alphalang [options] file.alpha\nUsage: alphalang -h for the help menu."
11
11
 
data/lib/locale_lister.rb CHANGED
@@ -20,10 +20,11 @@ def clean_locale_file_to_array(locale_name)
20
20
 
21
21
  clean_locale_file_array = []
22
22
  locale_file.each do |line|
23
- line.scan(/\p{Word}+[|]\p{Word}+|\p{Word}+/) do |word|
24
- clean_locale_file_array << word if word.size > 1
23
+ line.scan(/[\p{Word}\p{Emoji}]+[|][\p{Word}\p{Emoji}]+|[\p{Word}\p{Emoji}]+/) do |word|
24
+ clean_locale_file_array << word if word.size > 1 or word.match?(/\p{Emoji}/)
25
25
  end
26
26
  end
27
+
27
28
  clean_locale_file_array
28
29
  end
29
30
 
data/lib/locales/emoji ADDED
@@ -0,0 +1,18 @@
1
+ ;;.*$ ;;.*$
2
+ while πŸ”
3
+ print πŸ–¨οΈ
4
+ pause ⏸️
5
+ def πŸŽ₯
6
+ end 🏁
7
+ if ❓
8
+ elseif ❔
9
+ else ⁉️
10
+ (false|true) (πŸ‘Ž|πŸ‘)
11
+ (==|<=|>=) (==|<=|>=)
12
+ (not|!) (❌|!)
13
+ (and|&&) (🀞|&&)
14
+ (or|\|\|) (✌️|\|\|)
15
+ \s+ \s+
16
+ \d+ \d+
17
+ \w+ \w+
18
+ . .
@@ -0,0 +1,19 @@
1
+ x = 10
2
+
3
+ πŸ” x > 1 🀞 < 20
4
+ ⏸️(0.05)
5
+ πŸ–¨οΈ x
6
+ x = x + 1
7
+ 🏁
8
+
9
+ πŸŽ₯ foo(bar)
10
+ ❓ bar == πŸ‘
11
+ πŸ–¨οΈ bar
12
+ ❔ bar ❌ 5 🀞 ❌ 10
13
+ πŸ–¨οΈ 5
14
+ ⁉️
15
+ πŸ–¨οΈ 0
16
+ 🏁
17
+ 🏁
18
+
19
+ foo(πŸ‘)
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alphalang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - mattias, victor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -66,6 +66,7 @@ files:
66
66
  - lib/locale_lister.rb
67
67
  - lib/locales/de
68
68
  - lib/locales/default
69
+ - lib/locales/emoji
69
70
  - lib/locales/en
70
71
  - lib/locales/locale_template
71
72
  - lib/locales/sv
@@ -74,6 +75,8 @@ files:
74
75
  - lib/nodes/stmtnodes.rb
75
76
  - lib/rdparse.rb
76
77
  - lib/tester/demo_de.alpha
78
+ - lib/tester/demo_emoji.alpha
79
+ - lib/tester/demo_emoji.alpha~
77
80
  - lib/tester/demo_sv.alpha
78
81
  - lib/tester/fibonacci.alpha
79
82
  - lib/tester/test_unit.rb