public void setDelimiters(char openDelimiter, char closeDelimiter) { TemplateLexerATNSimulator interpreter = Interpreter; if (interpreter.OpenDelimiter == openDelimiter && interpreter.CloseDelimiter == closeDelimiter) { return; } _interp = getSimulatorForDelimiters(openDelimiter, closeDelimiter); Interpreter.CopyState(interpreter); }
private TemplateLexerATNSimulator getSimulatorForDelimiters(char openDelimiter, char closeDelimiter) { ATN atn = getATNForDelimiters(openDelimiter, closeDelimiter); lock (atnToSimulator) { TemplateLexerATNSimulator simulator; if (!atnToSimulator.TryGetValue(atn, out simulator)) { simulator = new TemplateLexerATNSimulator(this, atn, openDelimiter, closeDelimiter); atnToSimulator[atn] = simulator; } return(simulator); } }