Skip to content

Commit

Permalink
[js] Use specified base class in string $
Browse files Browse the repository at this point in the history
Previously `BaseStemmer` was hard-coded here, but now we use the base
class specified by -p here too (which defaults to `BaseStemmer`).

None of the shipped stemmers use string $, though the Schinke Latin
stemmer algorithm on the website does.
  • Loading branch information
ojwb committed Sep 25, 2023
1 parent 7cc8a1b commit 69e1ee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/generator_js.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ static void generate_dollar(struct generator * g, struct node * p) {
struct str * savevar = vars_newname(g);
g->B[0] = str_data(savevar);
writef(g, "~{~C~N"
"~Mvar /** !Object */ ~B0 = new BaseStemmer();~N", p);
"~Mvar /** !Object */ ~B0 = new ~P();~N", p);
writef(g, "~M~B0.copy_from(base);~N", p);

++g->copy_from_count;
Expand Down

0 comments on commit 69e1ee3

Please sign in to comment.