mt-lang 0.2.3 → 0.2.5

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: 627010e9d898c6ee8f1a1e41ff67c0d255aaefe24af708dcd170622ddd06afa2
4
- data.tar.gz: e5fd12e5c2a99ab16248088c18d274ace905e339549d6ac20d3f5a30d469dd9e
3
+ metadata.gz: a0880902d118bdf3d54e67251adef1b81f204a57e4dbc088adf0f7ee5778324a
4
+ data.tar.gz: 699e3e85fb21549b25189e9cfd49a09c09b2c7e3b7ffa26c3770995b11b4000c
5
5
  SHA512:
6
- metadata.gz: 9309828a4cf5f9b5719c7284baa6660e560b532f9430e2b4b58488b68afb4321e6880b3974a48d34cd7b185f84e06e904b9189bbd70ced7cdf71e459e8abf267
7
- data.tar.gz: b4672748568f0bc2f38364e0c072af36f94aa8c9966b981c63a17649680eacaa2a6fb9a453b53fdf6642a65f247e785d26ebe06dd12aca06d15195a591599844
6
+ metadata.gz: f68b652a243d7cb4079a92cbeb56c14983a8c7b73c8e725da7c2b7a4236b02e7397b030ae1e38c6c80b0bacd42266d085571e34cd518f98ae05c1ba803a14fc5
7
+ data.tar.gz: c76db6178a9789c819824fd9b0eeb8a11561f683a3f03c61d45993d761bcee6f8f603071ebd19a73b9513bdea9b96bfea95eab3fa5549b8ad4b8a7e27b1701cd
data/README.md CHANGED
@@ -10,6 +10,8 @@ mtc run hello.mt
10
10
 
11
11
  [VS Code extension](https://marketplace.visualstudio.com/items?itemName=teefan.milk-tea-lang) — syntax highlighting, IntelliSense, debugging
12
12
 
13
+ [Language Reference](https://teefan.github.io/mt-lang/) — full syntax, types, and standard library
14
+
13
15
  ---
14
16
 
15
17
  This README is the primary, implementation-focused language reference for the project.
data/docs/index.html CHANGED
@@ -252,7 +252,10 @@ p + p{margin-top:-.25rem}
252
252
  <span class="icon-moon">&#127769;</span>
253
253
  <span class="label">Theme</span>
254
254
  </button>
255
- <span style="font-size:.75rem">v1 &middot; Language Reference</span>
255
+ <span style="font-size:.75rem">
256
+ <a href="https://github.com/teefan/mt-lang" style="color:inherit;text-decoration:none" title="Source code on GitHub">&#9757; GitHub</a>
257
+ &nbsp;&middot;&nbsp; v1
258
+ </span>
256
259
  </div>
257
260
  </aside>
258
261
 
data/lib/milk_tea/base.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require "pathname"
4
4
 
5
5
  module MilkTea
6
- VERSION = "0.2.3"
6
+ VERSION = "0.2.5"
7
7
 
8
8
  def self.root
9
9
  @root ||= Pathname.new(File.expand_path("../..", __dir__))
@@ -823,10 +823,12 @@ module MilkTea
823
823
  arms.each_cons(2) do |first, second|
824
824
  next if first.binding_name || second.binding_name
825
825
  next if wildcard_pattern?(first.pattern) || wildcard_pattern?(second.pattern)
826
+ next if body_of.call(first).equal?(body_of.call(second))
826
827
  next unless node_fingerprint(body_of.call(first)) == node_fingerprint(body_of.call(second))
827
828
 
828
- pattern_line = second.pattern.respond_to?(:line) ? second.pattern.line : nil
829
- pattern_column = second.pattern.respond_to?(:column) ? second.pattern.column : nil
829
+ pattern = second.pattern
830
+ pattern_line = pattern.respond_to?(:line) ? pattern.line : second.binding_line
831
+ pattern_column = pattern.respond_to?(:column) ? pattern.column : second.binding_column
830
832
  emit_conciseness_hint(
831
833
  "prefer-or-pattern",
832
834
  line: pattern_line,
@@ -192,7 +192,7 @@ module MilkTea
192
192
 
193
193
  require_relative "../bindings"
194
194
 
195
- tools = VendoredTools.default_tools(root: MilkTea.root)
195
+ tools = VendoredTools.all(root: MilkTea.root)
196
196
  info "Building #{tools.length} vendored tool(s)..."
197
197
  info ""
198
198
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mt-lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Long (Teefan) Tran
@@ -583,7 +583,7 @@ metadata:
583
583
  homepage_uri: https://teefan.github.io/mt-lang/
584
584
  source_code_uri: https://github.com/teefan/mt-lang
585
585
  post_install_message: |
586
- Milk Tea 0.2.3 installed!
586
+ Milk Tea 0.2.5 installed!
587
587
 
588
588
  System requirements:
589
589
  - A C compiler (gcc or clang) must be available on PATH