()
| 48 | } |
| 49 | |
| 50 | parseComponentValue(): CSSValue { |
| 51 | let token = this.consumeToken(); |
| 52 | while (token.type === TokenType.WHITESPACE_TOKEN) { |
| 53 | token = this.consumeToken(); |
| 54 | } |
| 55 | |
| 56 | if (token.type === TokenType.EOF_TOKEN) { |
| 57 | throw new SyntaxError(`Error parsing CSS component value, unexpected EOF`); |
| 58 | } |
| 59 | |
| 60 | this.reconsumeToken(token); |
| 61 | const value = this.consumeComponentValue(); |
| 62 | |
| 63 | do { |
| 64 | token = this.consumeToken(); |
| 65 | } while (token.type === TokenType.WHITESPACE_TOKEN); |
| 66 | |
| 67 | if (token.type === TokenType.EOF_TOKEN) { |
| 68 | return value; |
| 69 | } |
| 70 | |
| 71 | throw new SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`); |
| 72 | } |
| 73 | |
| 74 | parseComponentValues(): CSSValue[] { |
| 75 | const values = []; |
no test coverage detected