Returns true if the characters in the text as position represent the start of an Opcode.
| 146 | // Returns true if the characters in the text as position represent |
| 147 | // the start of an Opcode. |
| 148 | bool startsWithOp(spv_text text, spv_position position) { |
| 149 | if (text->length < position->index + 3) return false; |
| 150 | char ch0 = text->str[position->index]; |
| 151 | char ch1 = text->str[position->index + 1]; |
| 152 | char ch2 = text->str[position->index + 2]; |
| 153 | return ('O' == ch0 && 'p' == ch1 && ('A' <= ch2 && ch2 <= 'Z')); |
| 154 | } |
| 155 | |
| 156 | // Returns false if the the floating point encoding requires a bit width |
| 157 | // different from the given width. Write the expected bit width via *expected. |
no outgoing calls
no test coverage detected