create-expo-cljs-app
Version:
Create a react native application with Expo and Shadow-CLJS!
21 lines (16 loc) • 456 B
JavaScript
import { SPACE, IDENT, STRING } from '../tokenTypes'
export default tokenStream => {
let fontFamily
if (tokenStream.matches(STRING)) {
fontFamily = tokenStream.lastValue
} else {
fontFamily = tokenStream.expect(IDENT)
while (tokenStream.hasTokens()) {
tokenStream.expect(SPACE)
const nextIdent = tokenStream.expect(IDENT)
fontFamily += ` ${nextIdent}`
}
}
tokenStream.expectEmpty()
return { fontFamily }
}