improve efficiency of syntax highlighter

closes #111
#111 further improvement to syntax highlighter
fix array out of bounds exception in some edge cases
fix bug where syntax highlighter could bail out early if a syntax node was zero characters long
merge in from master