Skip to content

Commit

Permalink
feat: rename new JavaScript parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Bikossor committed Jul 12, 2022
1 parent d8aad60 commit b68cdab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/factories/ParserFactory.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { IParser } from "../Interfaces";
import { JavaScriptRudusParser } from "../parser";
import { JavaScriptParser } from "../parser";
import { InputLanguage } from "../types";

export const createParser = (language: InputLanguage): IParser => {
switch (language) {
case "JavaScript":
return new JavaScriptRudusParser();
return new JavaScriptParser();
default:
throw new Error("InputLanguage not supported!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const variableParser = sequenceOf([
variableValue.map(state => `<span style="color:blue">${state.result}</span>`),
]);

export class JavaScriptRudusParser implements IParser {
export class JavaScriptParser implements IParser {
parse(input: string) {
return variableParser.run(input);
}
Expand Down
2 changes: 1 addition & 1 deletion src/parser/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { JavaScriptRudusParser } from "./JavaScript-rudus";
export { JavaScriptParser } from "./JavaScript";

0 comments on commit b68cdab

Please sign in to comment.