| 77 | } |
| 78 | |
| 79 | uint64_t Token::getIntValue() const |
| 80 | { |
| 81 | const IntegerValue *s; |
| 82 | if (m_value && (s = dynamic_cast<const IntegerValue *>(m_value.get()))) |
| 83 | { |
| 84 | return s->getValue(); |
| 85 | } |
| 86 | else |
| 87 | { |
| 88 | throw internal_error(format_string("unexpected token type %s on line %d", this->getTokenName(), |
| 89 | this->getLocation().m_firstLine)); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | bool Token::isBinaryOp() const |
| 94 | { |
no test coverage detected