patch for improved character support in spacing modifier range

This commit is contained in:
Sorrel Bri 2020-03-03 01:33:28 -08:00
parent d3ebe61577
commit 5c2138e04f

View file

@ -434,6 +434,7 @@ export const generateAST = latl => {
// tokenize // tokenize
const tokens = tokenize(latl.trim()); const tokens = tokenize(latl.trim());
// build tree // build tree
console.log(tokens)
const tree = buildTree(tokens); const tree = buildTree(tokens);
return tree; return tree;
} }
@ -456,6 +457,7 @@ export const parseLatl = (state, action) => {
return { ...state, parseResults: 'latl parsed successfully', results:[] } return { ...state, parseResults: 'latl parsed successfully', results:[] }
} }
catch (e) { catch (e) {
console.log(e)
return { ...state, parseResults: e} return { ...state, parseResults: e}
} }
} }
@ -476,7 +478,7 @@ const tokenTypes = [
['dot', `\\.`], ['dot', `\\.`],
['underscore', `\\_`], ['underscore', `\\_`],
[`referent`, `[A-Za-z]+[\\w\\-\\_]*`], [`referent`, `[A-Za-z]+[\\w\\-\\_]*`],
[`phone`, `[\u0100-\u02AF\u0300-\u03FFA-Za-z0]+`], [`phone`, `[\u0100-\u03FFA-Za-z0]+`],
['equal', `=`], ['equal', `=`],
[`lineBreak`, `\\n`], [`lineBreak`, `\\n`],
[`whiteSpace`, `\\s+`] [`whiteSpace`, `\\s+`]