use of org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider in project xtext-core by eclipse.
the class AbstractAntlrGeneratorFragment2 method createLexerTokensProvider.
protected MutableTokenDefProvider createLexerTokensProvider(final AntlrGrammar lexerGrammar, final KeywordHelper helper, final IXtextGeneratorFileSystemAccess fsa) {
Charset _forName = Charset.forName(this.codeConfig.getEncoding());
final MutableTokenDefProvider provider = new MutableTokenDefProvider(helper, _forName);
final IAntlrTokenFileProvider _function = () -> {
return fsa.readBinaryFile(lexerGrammar.getTokensFileName());
};
provider.setAntlrTokenFileProvider(_function);
return provider;
}
Aggregations