script/style tokeniser states

Review URL: https://codereview.chromium.org/642903004