Skip to content

Refactor TokenParser

Johannes Schiller requested to merge sydmontague/kcalc:lowercase-hex into master

This patch replaces the if/else chain in the string->token parsing with a data structure where looking up and adding new tokens is easier and (hopefully) more efficient.

As a side effect it also fixes

  • base 2/8/16 prefixes would count towards the digit limit
  • hexadecimal numbers are case sensitive, when they don't have to be
Edited by Johannes Schiller

Merge request reports