diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/css-tree/lib/syntax/atrule | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/css-tree/lib/syntax/atrule')
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/font-face.js | 8 | ||||
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/import.js | 39 | ||||
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/index.js | 15 | ||||
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/media.js | 12 | ||||
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/nest.js | 12 | ||||
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/page.js | 12 | ||||
| -rw-r--r-- | node_modules/css-tree/lib/syntax/atrule/supports.js | 80 |
7 files changed, 0 insertions, 178 deletions
diff --git a/node_modules/css-tree/lib/syntax/atrule/font-face.js b/node_modules/css-tree/lib/syntax/atrule/font-face.js deleted file mode 100644 index 48a0570a..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/font-face.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - parse: { - prelude: null, - block() { - return this.Block(true); - } - } -}; diff --git a/node_modules/css-tree/lib/syntax/atrule/import.js b/node_modules/css-tree/lib/syntax/atrule/import.js deleted file mode 100644 index 7403ad9e..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/import.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - String as StringToken, - Ident, - Url, - Function as FunctionToken, - LeftParenthesis -} from '../../tokenizer/index.js'; - -export default { - parse: { - prelude() { - const children = this.createList(); - - this.skipSC(); - - switch (this.tokenType) { - case StringToken: - children.push(this.String()); - break; - - case Url: - case FunctionToken: - children.push(this.Url()); - break; - - default: - this.error('String or url() is expected'); - } - - if (this.lookupNonWSType(0) === Ident || - this.lookupNonWSType(0) === LeftParenthesis) { - children.push(this.MediaQueryList()); - } - - return children; - }, - block: null - } -}; diff --git a/node_modules/css-tree/lib/syntax/atrule/index.js b/node_modules/css-tree/lib/syntax/atrule/index.js deleted file mode 100644 index ff600e34..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import fontFace from './font-face.js'; -import importAtrule from './import.js'; -import media from './media.js'; -import nest from './nest.js'; -import page from './page.js'; -import supports from './supports.js'; - -export default { - 'font-face': fontFace, - 'import': importAtrule, - media, - nest, - page, - supports -}; diff --git a/node_modules/css-tree/lib/syntax/atrule/media.js b/node_modules/css-tree/lib/syntax/atrule/media.js deleted file mode 100644 index a9b0eb6e..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/media.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - parse: { - prelude() { - return this.createSingleNodeList( - this.MediaQueryList() - ); - }, - block(isStyleBlock = false) { - return this.Block(isStyleBlock); - } - } -}; diff --git a/node_modules/css-tree/lib/syntax/atrule/nest.js b/node_modules/css-tree/lib/syntax/atrule/nest.js deleted file mode 100644 index 99fc15e5..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/nest.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - parse: { - prelude() { - return this.createSingleNodeList( - this.SelectorList() - ); - }, - block() { - return this.Block(true); - } - } -}; diff --git a/node_modules/css-tree/lib/syntax/atrule/page.js b/node_modules/css-tree/lib/syntax/atrule/page.js deleted file mode 100644 index 99fc15e5..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/page.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - parse: { - prelude() { - return this.createSingleNodeList( - this.SelectorList() - ); - }, - block() { - return this.Block(true); - } - } -}; diff --git a/node_modules/css-tree/lib/syntax/atrule/supports.js b/node_modules/css-tree/lib/syntax/atrule/supports.js deleted file mode 100644 index 9f8b56c6..00000000 --- a/node_modules/css-tree/lib/syntax/atrule/supports.js +++ /dev/null @@ -1,80 +0,0 @@ -import { - WhiteSpace, - Comment, - Ident, - Function, - Colon, - LeftParenthesis -} from '../../tokenizer/index.js'; - -function consumeRaw() { - return this.createSingleNodeList( - this.Raw(this.tokenIndex, null, false) - ); -} - -function parentheses() { - this.skipSC(); - - if (this.tokenType === Ident && - this.lookupNonWSType(1) === Colon) { - return this.createSingleNodeList( - this.Declaration() - ); - } - - return readSequence.call(this); -} - -function readSequence() { - const children = this.createList(); - let child; - - this.skipSC(); - - scan: - while (!this.eof) { - switch (this.tokenType) { - case Comment: - case WhiteSpace: - this.next(); - continue; - - case Function: - child = this.Function(consumeRaw, this.scope.AtrulePrelude); - break; - - case Ident: - child = this.Identifier(); - break; - - case LeftParenthesis: - child = this.Parentheses(parentheses, this.scope.AtrulePrelude); - break; - - default: - break scan; - } - - children.push(child); - } - - return children; -} - -export default { - parse: { - prelude() { - const children = readSequence.call(this); - - if (this.getFirstListNode(children) === null) { - this.error('Condition is expected'); - } - - return children; - }, - block(isStyleBlock = false) { - return this.Block(isStyleBlock); - } - } -}; |
