Update parser.js

Stylesheet parsing and rule checking rework