summaryrefslogtreecommitdiff
path: root/src/ljstype.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-27 15:08:09 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-27 15:08:09 +0100
commit6beeccbd0a859f3a9d1be4142d16a3d11ac30743 (patch)
tree0d6c8ded314a0b3e3c989952e4dbdff6a27048b3 /src/ljstype.js
parent5a47025d64f013975051473c1115ff70c0281785 (diff)
downloadfengari-6beeccbd0a859f3a9d1be4142d16a3d11ac30743.tar.gz
fengari-6beeccbd0a859f3a9d1be4142d16a3d11ac30743.tar.bz2
fengari-6beeccbd0a859f3a9d1be4142d16a3d11ac30743.zip
Basic lexing tests
Diffstat (limited to 'src/ljstype.js')
-rw-r--r--src/ljstype.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ljstype.js b/src/ljstype.js
index 52ac153..192db6f 100644
--- a/src/ljstype.js
+++ b/src/ljstype.js
@@ -5,6 +5,7 @@ const assert = require('assert');
const lisdigit = function(c) {
return /^\d$/.test(c.charAt(0));
+};
const lisxdigit = function(c) {
return /^[0-9a-fA-F]$/.test(c.charAt(0));
@@ -18,12 +19,12 @@ const lislalpha = function(c) {
return /^[_a-zA-z]$/.test(c.charAt(0));
};
-const lislanum = function(c) {
+const lislalnum = function(c) {
return /^[_a-zA-z0-9]$/.test(c.charAt(0));
};
-module.exports.lisdigit = lisdigit;
-module.exports.lislalpha = lislalpha;
-module.exports.lislanum = lislanum;
-module.exports.lisspace = lisspace;
-module.exports.lisxdigit = lisxdigit; \ No newline at end of file
+module.exports.lisdigit = lisdigit;
+module.exports.lislalnum = lislalnum;
+module.exports.lislalpha = lislalpha;
+module.exports.lisspace = lisspace;
+module.exports.lisxdigit = lisxdigit; \ No newline at end of file