Lines Matching refs:textValue
51 bool spvIsValidID(const char* textValue) {
52 const char* c = textValue;
59 return c != textValue;
64 spv_result_t spvTextToLiteral(const char* textValue, spv_literal_t* pLiteral) {
69 const size_t len = strlen(textValue);
73 switch (textValue[index]) {
105 if (len < 2 || textValue[0] != '"' || textValue[len - 1] != '"')
108 for (const char* val = textValue + 1; val != textValue + len - 1; ++val) {
122 double d = std::strtod(textValue, nullptr);
132 int64_t i64 = strtoll(textValue, nullptr, 10);
142 uint64_t u64 = strtoull(textValue, nullptr, 10);
182 /// @param[in] textValue word of text to be parsed
190 const char* textValue,
194 if ('!' == textValue[0]) {
195 if (auto error = encodeImmediate(context, textValue, pInst)) {
216 if ('%' == textValue[0]) {
217 textValue++;
221 if (!spvIsValidID(textValue)) {
222 return context->diagnostic() << "Invalid ID " << textValue;
224 const uint32_t id = context->spvNamedIdAssignOrGet(textValue);
245 if (grammar.lookupExtInst(pInst->extInstType, textValue, &extInst)) {
247 << "Invalid extended instruction name '" << textValue << "'.";
260 if (grammar.lookupSpecConstantOpcode(textValue, &opcode)) {
262 << " '" << textValue << "'.";
286 textValue, error_code_for_literals, expected_type, pInst)) {
295 textValue, error_code_for_literals, spvtools::kUnknownType,
334 textValue, error_code_for_literals, expected_type, pInst)) {
342 spv_result_t error = spvTextToLiteral(textValue, &literal);
346 << "Invalid literal string '" << textValue << "'.";
350 << "Expected literal string, found literal number '" << textValue
382 if (grammar.parseMaskOperand(type, textValue, &value)) {
384 << " operand '" << textValue << "'.";
392 grammar, context, SPV_OPERAND_TYPE_OPTIONAL_LITERAL_NUMBER, textValue,
398 textValue, pInst, pExpectedOperands);
404 textValue, pInst, pExpectedOperands);
408 << "Invalid word following !<integer>: " << textValue;
418 if (grammar.lookupOperand(type, textValue, strlen(textValue), &entry)) {
420 << " '" << textValue << "'.";
424 << " '" << textValue << "'.";