Skip to content

Commit

Permalink
feat: update Codestain.ts
Browse files Browse the repository at this point in the history
- remove tokenizer call
- remove creation of transformer
- remove transformation

#119
  • Loading branch information
Bikossor committed Jul 12, 2022
1 parent 0e35063 commit d054cfb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Codestain.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { InputLanguage } from "./types";
import { createParser, createTransformer } from "./factories";
import { tokenizer } from "./tokenizer";

export const Codestain = (language: InputLanguage, input: string) => {
const tokens = tokenizer(input);

const parser = createParser(language);
const ast = parser.parse(tokens);
const ast = parser.parse(input);

const transformer = createTransformer("HTML");
const output = transformer.transform(ast);
console.log(ast);

return output;
// TODO: transform result of parser here
};

0 comments on commit d054cfb

Please sign in to comment.