allow to modify document during highlighting
better diagnostic
stubs initial