Skip to content

Commit

Permalink
remove more unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinfest committed May 1, 2020
1 parent a95a222 commit e0fefd0
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e0fefd0

Please sign in to comment.