In the "Prefix" branch, you added some console.log calls and they were all commented out. These were helpful during testing. You should consider adding a "debugMode" option and then output those to the developer console (or user-defined function to output to the screen). Also Include the "scanbuffer" before it's finally passed to the parser function.
I just pushed an update to the master branch with a debug option. It logs the characters scanned, the state transitions, and the full scan buffer before invoking the parser.
In the "Prefix" branch, you added some console.log calls and they were all commented out. These were helpful during testing. You should consider adding a "debugMode" option and then output those to the developer console (or user-defined function to output to the screen). Also Include the "scanbuffer" before it's finally passed to the parser function.