Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1let { Comment } = require('postcss')2let Parser = require('postcss/lib/parser')3 4let NestedDeclaration = require('./nested-declaration')5let scssTokenizer = require('./scss-tokenize')6 7class ScssParser extends Parser {8 atrule(token) {9 let name = token[1]10 let prev = token11 while (!this.tokenizer.endOfFile()) {12 let next = this.tokenizer.nextToken()13 if (next[0] === 'word' && next[2] === prev[3] + 1) {14 name += next[1]15 prev = next16 } else {17 this.tokenizer.back(next)18 break19 }20 }21 22 super.atrule(['at-word', name, token[2], prev[3]])23 }24 25 comment(token) {26 if (token[4] === 'inline') {27 let node = new Comment()28 this.init(node, token[2])29 node.raws.inline = true30 let pos = this.input.fromOffset(token[3])31 node.source.end = {32 column: pos.col,33 line: pos.line,34 offset: token[3] + 135 }36 37 let text = token[1].slice(2)38 if (/^\s*$/.test(text)) {39 node.text = ''40 node.raws.left = text41 node.raws.right = ''42 } else {43 let match = text.match(/^(\s*)([^]*\S)(\s*)$/)44 let fixed = match[2].replace(/(\*\/|\/\*)/g, '*//*')45 node.text = fixed46 node.raws.left = match[1]47 node.raws.right = match[3]48 node.raws.text = match[2]49 }50 } else {51 super.comment(token)52 }53 }54 55 createTokenizer() {56 this.tokenizer = scssTokenizer(this.input)57 }58 59 raw(node, prop, tokens, customProperty) {60 super.raw(node, prop, tokens, customProperty)61 if (node.raws[prop]) {62 let scss = node.raws[prop].raw63 node.raws[prop].raw = tokens.reduce((all, i) => {64 if (i[0] === 'comment' && i[4] === 'inline') {65 let text = i[1].slice(2).replace(/(\*\/|\/\*)/g, '*//*')66 return all + '/*' + text + '*/'67 } else {68 return all + i[1]69 }70 }, '')71 if (scss !== node.raws[prop].raw) {72 node.raws[prop].scss = scss73 }74 }75 }76 77 rule(tokens) {78 let withColon = false79 let brackets = 080 let value = ''81 for (let i of tokens) {82 if (withColon) {83 if (i[0] !== 'comment' && i[0] !== '{') {84 value += i[1]85 }86 } else if (i[0] === 'space' && i[1].includes('\n')) {87 break88 } else if (i[0] === '(') {89 brackets += 190 } else if (i[0] === ')') {91 brackets -= 192 } else if (brackets === 0 && i[0] === ':') {93 withColon = true94 }95 }96 97 if (!withColon || value.trim() === '' || /^[#:A-Za-z-]/.test(value)) {98 super.rule(tokens)99 } else {100 tokens.pop()101 let node = new NestedDeclaration()102 this.init(node, tokens[0][2])103 104 let last105 for (let i = tokens.length - 1; i >= 0; i--) {106 if (tokens[i][0] !== 'space') {107 last = tokens[i]108 break109 }110 }111 if (last[3]) {112 let pos = this.input.fromOffset(last[3])113 node.source.end = {114 column: pos.col,115 line: pos.line,116 offset: last[3] + 1117 }118 } else {119 let pos = this.input.fromOffset(last[2])120 node.source.end = {121 column: pos.col,122 line: pos.line,123 offset: last[2] + 1124 }125 }126 127 while (tokens[0][0] !== 'word') {128 node.raws.before += tokens.shift()[1]129 }130 131 if (tokens[0][2]) {132 let pos = this.input.fromOffset(tokens[0][2])133 node.source.start = {134 column: pos.col,135 line: pos.line,136 offset: tokens[0][2]137 }138 }139 140 node.prop = ''141 while (tokens.length) {142 let type = tokens[0][0]143 if (type === ':' || type === 'space' || type === 'comment') {144 break145 }146 node.prop += tokens.shift()[1]147 }148 149 node.raws.between = ''150 151 let token152 while (tokens.length) {153 token = tokens.shift()154 155 if (token[0] === ':') {156 node.raws.between += token[1]157 break158 } else {159 node.raws.between += token[1]160 }161 }162 163 if (node.prop[0] === '_' || node.prop[0] === '*') {164 node.raws.before += node.prop[0]165 node.prop = node.prop.slice(1)166 }167 node.raws.between += this.spacesAndCommentsFromStart(tokens)168 this.precheckMissedSemicolon(tokens)169 170 for (let i = tokens.length - 1; i > 0; i--) {171 token = tokens[i]172 if (token[1] === '!important') {173 node.important = true174 let string = this.stringFrom(tokens, i)175 string = this.spacesFromEnd(tokens) + string176 if (string !== ' !important') {177 node.raws.important = string178 }179 break180 } else if (token[1] === 'important') {181 let cache = tokens.slice(0)182 let str = ''183 for (let j = i; j > 0; j--) {184 let type = cache[j][0]185 if (str.trim().indexOf('!') === 0 && type !== 'space') {186 break187 }188 str = cache.pop()[1] + str189 }190 if (str.trim().indexOf('!') === 0) {191 node.important = true192 node.raws.important = str193 tokens = cache194 }195 }196 197 if (token[0] !== 'space' && token[0] !== 'comment') {198 break199 }200 }201 202 this.raw(node, 'value', tokens)203 204 if (node.value.includes(':')) {205 this.checkMissedSemicolon(tokens)206 }207 208 this.current = node209 }210 }211}212 213module.exports = ScssParser214 