coffee-lex
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -903,4 +903,2 @@ var babelHelpers = {}; | ||
setType(SEMICOLON); | ||
} else if (consume('?')) { | ||
setType(EXISTENCE); | ||
} else if (consume('`')) { | ||
@@ -913,4 +911,3 @@ setType(JS); | ||
} else { | ||
var raw = source.slice(start, index); | ||
switch (raw) { | ||
switch (consumed()) { | ||
case 'if': | ||
@@ -973,3 +970,7 @@ case 'unless': | ||
} else if (consumeAny(OPERATORS)) { | ||
setType(OPERATOR); | ||
if (consumed() === '?') { | ||
setType(EXISTENCE); | ||
} else { | ||
setType(OPERATOR); | ||
} | ||
} else if (consume('\\')) { | ||
@@ -1147,2 +1148,6 @@ setType(CONTINUATION); | ||
function consumed() { | ||
return source.slice(start, index); | ||
} | ||
function setType(newType) { | ||
@@ -1149,0 +1154,0 @@ location = new SourceLocation(newType, start); |
@@ -909,4 +909,2 @@ (function (global, factory) { | ||
setType(SEMICOLON); | ||
} else if (consume('?')) { | ||
setType(EXISTENCE); | ||
} else if (consume('`')) { | ||
@@ -919,4 +917,3 @@ setType(JS); | ||
} else { | ||
var raw = source.slice(start, index); | ||
switch (raw) { | ||
switch (consumed()) { | ||
case 'if': | ||
@@ -979,3 +976,7 @@ case 'unless': | ||
} else if (consumeAny(OPERATORS)) { | ||
setType(OPERATOR); | ||
if (consumed() === '?') { | ||
setType(EXISTENCE); | ||
} else { | ||
setType(OPERATOR); | ||
} | ||
} else if (consume('\\')) { | ||
@@ -1153,2 +1154,6 @@ setType(CONTINUATION); | ||
function consumed() { | ||
return source.slice(start, index); | ||
} | ||
function setType(newType) { | ||
@@ -1155,0 +1160,0 @@ location = new SourceLocation(newType, start); |
{ | ||
"name": "coffee-lex", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Stupid lexer for CoffeeScript.", | ||
@@ -5,0 +5,0 @@ "main": "dist/coffee-lex.umd.js", |
74585
2116