Skip to content

Commit 5d59594

Browse files
committed
Inlinify json
1 parent 20856b3 commit 5d59594

File tree

3 files changed

+613
-5218
lines changed

3 files changed

+613
-5218
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ function parser() {
504504
function parse_decllist() {
505505
// grab ident
506506

507-
if(token.type === 'ident' || token.type === 'builtin') {
507+
if(token.type === 'ident') {
508508
var name = token.data
509509
state.unshift(ident())
510510
state.scope.define(name)
@@ -560,7 +560,7 @@ function parser() {
560560
}
561561

562562
function parse_ident() {
563-
if(token.type !== 'ident' && token.type !== 'builtin') {
563+
if(token.type !== 'ident') {
564564
return unexpected('expected user-defined name, got '+token.data)
565565
}
566566

test/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var ParseArray = require('../direct')
1010
var expectSelectors = require('./selectors-expected.json')
1111
var fixture = path.join(__dirname, 'fixture.glsl')
1212

13-
test('selector stream', function(t) {
13+
test.only('selector stream', function(t) {
1414
var selectors = []
1515

1616
fs.createReadStream(fixture)
@@ -20,6 +20,13 @@ test('selector stream', function(t) {
2020
selectors.push(selector(x))
2121
})
2222
.once('end', function() {
23+
// console.log(selectors.length, expectSelectors.length)
24+
// for (let i = 0; i < selectors.length; i++) {
25+
// if (selectors[i].length !== expectSelectors[i].length) {
26+
// console.log(i, selectors[i], expectSelectors[i])
27+
// break
28+
// }
29+
// }
2330
t.deepEqual(selectors, expectSelectors)
2431
t.end()
2532
})

0 commit comments

Comments
 (0)