kumi-parser 0.0.29 → 0.0.30
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/kumi/parser/smart_tokenizer.rb +8 -5
- data/lib/kumi/parser/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: 4ec60e114746a0b2790e33eee5cc5fee382102057cca454adcf90c585a1b71e3
|
|
4
|
+
data.tar.gz: a37374381ed4f9ecd8cac6bc7ba92a23ddaf9ed40a02a3ba7f61cd2b8c8f70bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f64d28aa1d89ea9abb1ed1aa0cd3db327a7ac5a1e10e77c0cb8fa0bf66473d31914632ef977f89200bfd76a11b1abbaf6a505da959cd1e8cd9ec4994cfedaaf
|
|
7
|
+
data.tar.gz: b77960ec662f5549a8b2047115fb8f6fbdfb0a9617ead6f1de8958a216b62107c961e950a3054042d7b2e4ef6512c04ee6300cdd3c82c8d8690e09566443dfec
|
|
@@ -163,13 +163,16 @@ module Kumi
|
|
|
163
163
|
identifier_or_label_name = consume_while { |c| c.match?(/[a-zA-Z0-9_]/) }
|
|
164
164
|
location = Kumi::Syntax::Location.new(file: @source_file, line: @line, column: start_column)
|
|
165
165
|
|
|
166
|
-
# Check if it's a constant FIRST (e.g., Float::INFINITY or
|
|
166
|
+
# Check if it's a constant FIRST (e.g., Float::INFINITY or Kumi::TestSharedSchemas::Tax)
|
|
167
167
|
# This needs to be checked before label detection because labels also start with `:``
|
|
168
168
|
if current_char == ':' && peek_char == ':'
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
full_constant = identifier_or_label_name
|
|
170
|
+
while current_char == ':' && peek_char == ':'
|
|
171
|
+
advance # consume first :
|
|
172
|
+
advance # consume second :
|
|
173
|
+
constant_name = consume_while { |c| c.match?(/[a-zA-Z0-9_]/) }
|
|
174
|
+
full_constant = "#{full_constant}::#{constant_name}"
|
|
175
|
+
end
|
|
173
176
|
add_token(:constant, full_constant, Kumi::Parser::TOKEN_METADATA[:constant])
|
|
174
177
|
return
|
|
175
178
|
end
|
data/lib/kumi/parser/version.rb
CHANGED