mt-lang 0.2.4 → 0.2.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: e084e93ef653242052b06a0357bc6b67a9ec1f29f966dd4cff918218d950812e
4
- data.tar.gz: a0a20b5e101aaef6f21e28487b24beaf116c60fa8b36f5cc1bf81ea716102124
3
+ metadata.gz: 10511367134e7b86901ee81dd22007c1e902139f3dc3e738edcbbab52ce6f978
4
+ data.tar.gz: bbb13727c9cbecc0dc890e6d2f66620c1e28a9e0c9d924600c34ee29b19bb1f8
5
5
  SHA512:
6
- metadata.gz: '00458f0f8f2250b76f257643bafbd9868adc31c609ff73b35ae913aadacaefa14b782da12114f1f7bdad95534430e21f841baea279cbf90f1ea8a763b1c9d14b'
7
- data.tar.gz: 243c6c9c8b9fd48c3ddc8fc4c6dad82a95666418e0d6f52df34733458bd7318deab8b9ba16b2a04e2418a4c259c80ac856121c44a4c23e9ef3bd50a351f061cb
6
+ metadata.gz: f3c5d9fb56448090e0576193a8a892f88fa1f8185c49d11f42e6946cecf6545cef4027da911e1ed7714aad46b740796e872788a936fda47a4276fd02df3adfae
7
+ data.tar.gz: 97dd1426ab931fb7776a910767d7182113490bd936cc534868ed80046f368c17034099305ab4ee1dd8be09fd6c4acd0cf89d1061527617b583e578250eafd324
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.4"
6
+ VERSION = "0.2.6"
7
7
 
8
8
  def self.root
9
9
  @root ||= Pathname.new(File.expand_path("../..", __dir__))
@@ -208,14 +208,12 @@ module MilkTea
208
208
 
209
209
  write_event("terminated")
210
210
  write_event("exited", { exitCode: exit_code })
211
- @session.request_exit!
212
211
  end
213
212
  rescue StandardError => e
214
213
  @session.terminate!
215
214
  write_event("output", { category: "stderr", output: "DAP runtime error: #{e.message}\n" })
216
215
  write_event("terminated")
217
216
  write_event("exited", { exitCode: 1 })
218
- @session.request_exit!
219
217
  ensure
220
218
  @runtime_mutex.synchronize do
221
219
  @runtime_pid = nil
@@ -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,
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.4
4
+ version: 0.2.6
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.4 installed!
586
+ Milk Tea 0.2.6 installed!
587
587
 
588
588
  System requirements:
589
589
  - A C compiler (gcc or clang) must be available on PATH