()
| 214 | |
| 215 | @profile |
| 216 | private parse(): void { |
| 217 | try { |
| 218 | if (!this._ast) { |
| 219 | if (!this._source && this._file) { |
| 220 | this.load(); |
| 221 | } |
| 222 | // [object Object] check guards against empty app.css file |
| 223 | if (this._source && this.source !== '[object Object]') { |
| 224 | this.parseCSSAst(); |
| 225 | } |
| 226 | } |
| 227 | if (this._ast) { |
| 228 | this.createSelectorsAndKeyframes(); |
| 229 | } else { |
| 230 | this._selectors = []; |
| 231 | } |
| 232 | } catch (e) { |
| 233 | if (Trace.isEnabled()) { |
| 234 | Trace.write('Css styling failed: ' + e, Trace.categories.Style, Trace.messageType.error); |
| 235 | } |
| 236 | this._selectors = []; |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | @profile |
| 241 | private async parseCSSAst() { |
no test coverage detected