modl 0.3.12 → 0.3.13

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: 1827bb8abaccc7771bf7ea845006a499b798f37f7697949efec86d539df88815
4
- data.tar.gz: c534d0b8a027287698d2a624c664ec19cced108a579b2b52f0518c8d9a09a2c5
3
+ metadata.gz: 86f5ec05e9bac3dceff39c2e38fadd43b6f30295329af83bc641c06d89d5714a
4
+ data.tar.gz: 4cfff5e76356fa15ab754861976cd353d7a13cb2c00f256b6b37f9298ca9f3f9
5
5
  SHA512:
6
- metadata.gz: 4d4d737f13ad9508ba7fcdc5a9187d457d6eb03fa445b9f934eaa982c4cb36fd5f114f9b4a039c8dc8015facb2dda1b8816327b56fcd346619ea534ded83b59e
7
- data.tar.gz: d668afa32aedf30f3ebf949a1a8f64962986c558a122c5b2d1b0b8c84c495e8fa5bce7b5a729c7a2b4f44044dac6d3bb1871268806f972f8a7967d0916a1d443
6
+ metadata.gz: 3285de14057c2ec9be39e3aad436987ccb6543db419cd8c175c9e520cf306c8ccabd3022caa61e454db6ce8539e55649c79ade9a4b5babc6fa7a74020392ef23
7
+ data.tar.gz: e84998430ef02bba1882af4e91dc538783b0a59ee1dcb53022c26ddfc79813947546468e0631653551427142e5a72318a200aac0d14c3dbc7644c2954fba5b2e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.3.13
2
+ ===
3
+ - Added missing exceptions for Orphan Pairs
4
+
1
5
  0.3.12
2
6
  ===
3
7
  - Use file cache on load error - GitHub issue #20
@@ -60,15 +60,13 @@ module MODL
60
60
  end
61
61
 
62
62
  if pairs.has_key?(s.pair.key)
63
- # TODO: raise an exception
64
- puts 'Duplicate top level key.'
63
+ raise InterpreterError, 'Duplicate top level keys are not allowed.'
65
64
  else
66
65
  pairs[s.pair.key] = s
67
66
  end
68
67
  else
69
- if pairs.length > 0 && !all_hidden(pairs.keys)
70
- # TODO: raise an exception
71
- puts 'Mixed top-level types.'
68
+ if pairs.length > 0 && !all_hidden(pairs.keys) && !s.top_level_conditional
69
+ raise InterpreterError, 'Mixed top-level types are not allowed.'
72
70
  else
73
71
  new_structures.push(s)
74
72
  end
@@ -24,6 +24,6 @@
24
24
 
25
25
  module MODL
26
26
  module Parser
27
- VERSION = "0.3.12"
27
+ VERSION = "0.3.13"
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Walmsley
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-28 00:00:00.000000000 Z
11
+ date: 2019-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: antlr4-runtime