blob: 80dfee5cb2dd6f662c02b6f0c99254a39d9d89ab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package tools.refinery.language.ide.contentassist;
import com.google.inject.Inject;
import com.google.inject.Injector;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.TokenSource;
import tools.refinery.language.ide.contentassist.antlr.ProblemParser;
/**
* Code is duplicated from {@link tools.refinery.language.parser.antlr.TokenSourceInjectingProblemParser} due to
* Xtext code generation.
*/
public class TokenSourceInjectingProblemParser extends ProblemParser {
@Inject
private Injector injector;
@Override
protected TokenSource createLexer(CharStream stream) {
var tokenSource = super.createLexer(stream);
injector.injectMembers(tokenSource);
return tokenSource;
}
}
|