yeptris 0.6.9.2 → 0.6.10.1

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: 128c08457353396f6f709f8719256a3b3ce1463518456b34987f252314a0dda4
4
- data.tar.gz: 9c20441656c1fdb05003d3e0fa0ee4af6d7d758d5505d387fb09dfb86d37e493
3
+ metadata.gz: 911e4f9b49027d9a90c269d485980d025040866830e8138d6dbb7e573e6e49ca
4
+ data.tar.gz: c48b0a777f5e7f7f3771bdb44661f7a5d3f11e3713895b3d0029847ce56cb7ef
5
5
  SHA512:
6
- metadata.gz: a3db668d48f7febd05d6ab518c5696704a6673fe5b9e7dd2fab2ea3ea3fcb41e021cb41b3136ddc96f6d5540a8ee9e8cc6c37997ff4a56de719ec1e783fa7fa0
7
- data.tar.gz: 4cb9c60fd78802cb49a97fffb1ce9fd27e047cd5204edf5c1e2621110613122babbac634d2a273a360029ea6c5df15bbdb7298fcb100c3fa53a66abb838bbf56
6
+ metadata.gz: cf0d8e4fb6c0833b3a1232293cc55ce4e51e4a88af05b84eee940288c197eaf2c837c3f75382cdcb643a64680869e314ae09b3076b711953cd40cd244535aedb
7
+ data.tar.gz: 3276f1b2af11b03a225b0b52bc7bc38982c38a65fe50b3890ab7a02d9d8c202a7e2703efc8879b8d96e9f51483e01115961c263fc89093acf01733ca71f0d454
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.9.2".freeze
6
+ VERSION = "0.6.10.1".freeze
7
7
  # The error hierarchy lives in THIS file (the parent namespace's
8
8
  # own file): nested constants do not trigger a parent-constant
9
9
  # autoload, and the law forbids internal requires — defining the
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(yeptris
6
- VERSION 0.6.9
6
+ VERSION 0.6.10
7
7
  DESCRIPTION "Ultra-fast YAML 1.2 parser, emitter and streamer in C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -8,6 +8,8 @@
8
8
 
9
9
  #include "dom.h"
10
10
 
11
+ #include <yeptris/resolve.h> /* the tag-id SSOT (the strict literal arm) */
12
+
11
13
  /* The bounded-parse caps: each node consumes at least one input byte
12
14
  * (the grammar guarantees it), so len + 1024 is airtight for valid
13
15
  * documents; docs and anchors are sparser still. The arena copies
@@ -801,8 +803,15 @@ int dom_on_flow_build(void* ctx, const char* p, size_t open, size_t len, uint32_
801
803
  }
802
804
  yep_view v = {p + t.at, (uint32_t)(t.end - t.at)};
803
805
  d->nodes[sid].value = dom_str_in(d, &v, 1);
804
- d->nodes[sid].tag_id =
805
- t.cls == '#' ? yep_resolve_number(r, t.is_float) : r->resolve(NULL, v.p, v.len);
806
+ if (t.cls == '#') {
807
+ d->nodes[sid].tag_id = yep_resolve_number(r, t.is_float);
808
+ } else if (d->flow_strict) {
809
+ /* strict JSON: the walker validated the span is exactly
810
+ * one of the three RFC 8259 words — no resolver dispatch */
811
+ d->nodes[sid].tag_id = (v.p[0] == 'n') ? YEPTRIS_TAG_NULL : YEPTRIS_TAG_BOOL;
812
+ } else {
813
+ d->nodes[sid].tag_id = r->resolve(NULL, v.p, v.len);
814
+ }
806
815
  if (dom_place(d, sid) != 0) {
807
816
  goto fail;
808
817
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.9.2
4
+ version: 0.6.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.