MCPcopy
hub / github.com/digitalbazaar/jsonld.js / type_suffix

Function type_suffix

tests/webidl/WebIDLParser.js:169–188  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

167 };
168
169 var type_suffix = function(obj) {
170 while (true) {
171 all_ws();
172 if (consume(OTHER, "?")) {
173 if (obj.nullable) error("Can't nullable more than once");
174 obj.nullable = true;
175 } else if (consume(OTHER, "[")) {
176 all_ws();
177 consume(OTHER, "]") || error("Unterminated array type");
178 if (!obj.array) {
179 obj.array = 1;
180 obj.nullableArray = [obj.nullable];
181 } else {
182 obj.array++;
183 obj.nullableArray.push(obj.nullable);
184 }
185 obj.nullable = false;
186 } else return;
187 }
188 };
189
190 var single_type = function() {
191 var prim = primitive_type(),

Callers 2

single_typeFunction · 0.85
union_typeFunction · 0.85

Calls 3

all_wsFunction · 0.85
consumeFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected