Browse Source

remove more unused code

Michael Bolin 5 years ago
parent
commit
e0fefd0474
1 changed files with 0 additions and 21 deletions
  1. 0 21
      src/index.ts

+ 0 - 21
src/index.ts

@@ -19,27 +19,6 @@ class GrammarStore {
 
   constructor(private registry: Registry) {}
 
-  // This does not seem to work. Note VS Code does not appear to be going this route.
-  async createTokensProvider(scopeName: string): Promise<monaco.languages.TokensProvider> {
-    const grammar = await this.getGrammar(scopeName);
-    if (grammar == null) {
-      throw Error(`no grammar for ${scopeName}`);
-    }
-
-    return {
-      getInitialState(): IState {
-        return INITIAL;
-      },
-
-      tokenize(line: string, state: IState): monaco.languages.ILineTokens {
-        const lineTokens = grammar.tokenizeLine(line, <StackElement>state);
-        const {tokens, ruleStack} = lineTokens;
-        // @ts-ignore: probably should not be ignoring this
-        return {tokens, endState: ruleStack};
-      },
-    };
-  }
-
   // https://github.com/NeekSandhu/monaco-editor-textmate/issues/11#issuecomment-561984387
   // provides some insight as to why this isn't working.
   async createEncodedTokensProvider(