rng 0.3.5 → 0.3.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 +4 -4
- data/lib/rng/parse_tree_processor.rb +1 -5
- data/lib/rng/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fdcf95250d1a2a74faf391653627fb81dad5c60eba650a206ad9c9cce4a6b638
|
|
4
|
+
data.tar.gz: 3ec79ed69ac17cf4a0c7f24c7b4d39b4deaf63c0c2d5868b8579fb29a3ca83ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af94bb3c3fb3c56877df25ca93a89274664a3e8649524dbc2a6d1b3775541e9c4e6060f5df5eb4851966ad8de23e7fb9e4c70ed8bbf6977bb21578ddaa19dabe
|
|
7
|
+
data.tar.gz: e29d6b582c39eac4d0c4245a318c2cbae919e178403d44afe5c10fa271ab5391785d02e7b7819ce3beca6e4992d7ab8684e278858fa5e3dbc8326cb4ac527173
|
|
@@ -585,14 +585,10 @@ module Rng
|
|
|
585
585
|
# @param text [String] Grammar block content
|
|
586
586
|
# @return [Hash] Parsed structure
|
|
587
587
|
def parse_grammar_with_scope(text)
|
|
588
|
-
# Convert ## doc comments to # regular comments so the parser's whitespace
|
|
589
|
-
# rule can consume them. This preserves parseability while keeping the
|
|
590
|
-
# text structure intact (just loses ## -> # for whitespace handling).
|
|
591
|
-
processed = text.gsub(/^(\s*)##/, '\1#')
|
|
592
588
|
parser = Rng::RncParser.new
|
|
593
589
|
|
|
594
590
|
# Parse using grammar rule
|
|
595
|
-
parser.grammar.parse(
|
|
591
|
+
parser.grammar.parse(text.strip)
|
|
596
592
|
|
|
597
593
|
# Return grammar structure
|
|
598
594
|
rescue Parslet::ParseFailed => e
|
data/lib/rng/version.rb
CHANGED