Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/flo-bit/shapecraft. flo-bit.dev/shapecraft
Something went wrong. Try again.
1.1 kB · 39 lines
JavaScript
at commit da69385e
12345678910111213141516171819202122232425262728293031323334353637383940import { Comma, WhiteSpace } from '../../tokenizer/index.js';
// var( <ident> , <value>? )export default function() { const children = this.createList();
this.skipSC();
// NOTE: Don't check more than a first argument is an ident, rest checks are for lexer children.push(this.Identifier());
this.skipSC();
if (this.tokenType === Comma) { children.push(this.Operator());
const startIndex = this.tokenIndex; const value = this.parseCustomProperty ? this.Value(null) : this.Raw(this.consumeUntilExclamationMarkOrSemicolon, false);
if (value.type === 'Value' && value.children.isEmpty) { for (let offset = startIndex - this.tokenIndex; offset <= 0; offset++) { if (this.lookupType(offset) === WhiteSpace) { value.children.appendData({ type: 'WhiteSpace', loc: null, value: ' ' }); break; } } }
children.push(value); }
return children;};