** If expression is a numeric constant, fills 'v' with its value ** and returns 1. Otherwise, returns 0. */
| 41 | ** and returns 1. Otherwise, returns 0. |
| 42 | */ |
| 43 | static int tonumeral(const expdesc *e, TValue *v) { |
| 44 | if (hasjumps(e)) |
| 45 | return 0; /* not a numeral */ |
| 46 | switch (e->k) { |
| 47 | case VKINT: |
| 48 | if (v) setivalue(v, e->u.ival); |
| 49 | return 1; |
| 50 | case VKFLT: |
| 51 | if (v) setfltvalue(v, e->u.nval); |
| 52 | return 1; |
| 53 | default: return 0; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | |
| 58 | /* |
no outgoing calls
no test coverage detected