caesar-parser
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -286,18 +286,21 @@ 'use strict'; | ||
var ch = st.next(); | ||
try { | ||
switch (ch) { | ||
case 't': | ||
next('r').next('u').next('e'); | ||
return true; | ||
case 'f': | ||
next('a').next('l').next('s').next('e'); | ||
return false; | ||
case 'n': | ||
next('u').next('l').next('l'); | ||
return null; | ||
default: | ||
throw new Error('word error'); | ||
} | ||
} catch (e) { | ||
return this.error('word syntax error.', st); | ||
switch (ch) { | ||
case 't': | ||
next('r'); | ||
next('u'); | ||
next('e'); | ||
return true; | ||
case 'f': | ||
next('a'); | ||
next('l'); | ||
next('s'); | ||
next('e'); | ||
return false; | ||
case 'n': | ||
next('u'); | ||
next('l'); | ||
next('l'); | ||
return null; | ||
default: | ||
return this.error('word syntax error.', st); | ||
} | ||
@@ -307,5 +310,3 @@ | ||
if (st.next() !== _ch) { | ||
throw new Error('word error'); | ||
} else { | ||
return { next: next }; | ||
this.error('word syntax error.', st); | ||
} | ||
@@ -312,0 +313,0 @@ } |
{ | ||
"name": "caesar-parser", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -237,18 +237,21 @@ import Parser from './Parser' | ||
const ch = st.next() | ||
try { | ||
switch (ch) { | ||
case 't': | ||
next('r').next('u').next('e') | ||
return true | ||
case 'f': | ||
next('a').next('l').next('s').next('e') | ||
return false | ||
case 'n': | ||
next('u').next('l').next('l') | ||
return null | ||
default: | ||
throw new Error('word error') | ||
} | ||
} catch (e) { | ||
return this.error('word syntax error.', st) | ||
switch (ch) { | ||
case 't': | ||
next('r') | ||
next('u') | ||
next('e') | ||
return true | ||
case 'f': | ||
next('a') | ||
next('l') | ||
next('s') | ||
next('e') | ||
return false | ||
case 'n': | ||
next('u') | ||
next('l') | ||
next('l') | ||
return null | ||
default: | ||
return this.error('word syntax error.', st) | ||
} | ||
@@ -258,5 +261,3 @@ | ||
if (st.next() !== _ch) { | ||
throw new Error('word error') | ||
} else { | ||
return {next: next} | ||
this.error('word syntax error.', st) | ||
} | ||
@@ -263,0 +264,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24
2474
74932