@lokascript/framework 2.9.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/tokenization/char-classifiers.d.ts +2 -2
- package/dist/core/tokenization/index.js +1 -1
- package/dist/core/tokenization/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/multilingual/index.js +1 -1
- package/dist/multilingual/index.js.map +1 -1
- package/package.json +2 -2
- package/src/core/tokenization/char-classifiers.ts +2 -2
- package/src/core/tokenization/token-utils.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokascript/framework",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Generic framework for building multilingual DSLs with semantic parsing and grammar transformation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"author": "LokaScript Contributors",
|
|
97
97
|
"license": "MIT",
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@lokascript/intent": "^2.9.
|
|
99
|
+
"@lokascript/intent": "^2.9.2"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/node": "^20.0.0",
|
|
@@ -67,10 +67,10 @@ export interface LatinCharClassifiers {
|
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* // Spanish letters
|
|
70
|
-
* const { isLetter, isIdentifierChar } = createLatinCharClassifiers(/[a-zA-
|
|
70
|
+
* const { isLetter, isIdentifierChar } = createLatinCharClassifiers(/[a-zA-Z\u00e1\u00e9\u00ed\u00f3\u00fa\u00fc\u00f1\u00c1\u00c9\u00cd\u00d3\u00da\u00dc\u00d1]/);
|
|
71
71
|
*
|
|
72
72
|
* // German letters
|
|
73
|
-
* const { isLetter, isIdentifierChar } = createLatinCharClassifiers(/[a-zA-
|
|
73
|
+
* const { isLetter, isIdentifierChar } = createLatinCharClassifiers(/[a-zA-Z\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df]/);
|
|
74
74
|
*/
|
|
75
75
|
export function createLatinCharClassifiers(letterPattern: RegExp): LatinCharClassifiers {
|
|
76
76
|
const isLetter = (char: string): boolean => letterPattern.test(char);
|
|
@@ -252,7 +252,7 @@ export function isDigit(char: string): boolean {
|
|
|
252
252
|
* other script.
|
|
253
253
|
*/
|
|
254
254
|
export function stripOptionalDiacritics(word: string): string {
|
|
255
|
-
return word.replace(/[
|
|
255
|
+
return word.replace(/[\u064b-\u0652\u0670]/g, '');
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
/**
|