Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit c1c0528

Browse files
authored
Refactor of LU parser and LU raw parse API (#1285)
* Refactor of LU parser and LU raw parse API * Exposing raw lu parsing * Adding fixtures for new test * Removing console.log * Adding missing fixture file * Addressing PR comments
1 parent fcb2cdb commit c1c0528

File tree

6 files changed

+2285
-456
lines changed

6 files changed

+2285
-456
lines changed

packages/lu/src/parser/lu/lu.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*/
55

66
const translateHelpers = require('./../lufile/translate-helpers')
7-
87
const luOptions = require('./luOptions')
8+
const luParser = require('./../lufile/luParser')
99

1010
class Lu {
1111
constructor(content, options = new luOptions){
@@ -22,6 +22,10 @@ class Lu {
2222
}
2323
}
2424

25+
parse(){
26+
return luParser.parse(this.content, undefined, {});
27+
}
28+
2529
async translate(translate_key, tgt_lang, translate_comments = false, translate_link_text = false, region = ''){
2630
const translateSettings = new translateHelpers.translationSettings();
2731
translateSettings.subscriptionKey = translate_key

0 commit comments

Comments
 (0)