13 lines
268 B
Plaintext
13 lines
268 B
Plaintext
|
import { NUMBER, SLASH } from '../tokenTypes'
|
||
|
|
||
|
export default tokenStream => {
|
||
|
let aspectRatio = tokenStream.expect(NUMBER)
|
||
|
|
||
|
if (tokenStream.hasTokens()) {
|
||
|
tokenStream.expect(SLASH)
|
||
|
aspectRatio /= tokenStream.expect(NUMBER)
|
||
|
}
|
||
|
|
||
|
return { aspectRatio }
|
||
|
}
|