public static Parser.ILexer CreateLexer(SupportedLanguage language, TextReader textReader, LexerMemento state)
		{
			switch (language) {
				case SupportedLanguage.CSharp:
					//return new ICSharpCode.NRefactory.Parser.CSharp.Lexer(textReader, state);
					throw new System.NotSupportedException("C# Lexer does not support loading a previous state.");
				case SupportedLanguage.VBNet:
					return new ICSharpCode.NRefactory.Parser.VB.Lexer(textReader, state);
			}
			throw new System.NotSupportedException(language + " not supported.");
		}
Example #2
0
 protected AbstractLexer(TextReader reader, LexerMemento state)
     : this(reader)
 {
     SetInitialLocation(new Location(state.Column, state.Line));
     lastToken = new Token(state.PrevTokenKind, 0, 0);
 }
Example #3
0
		protected AbstractLexer(TextReader reader, LexerMemento state)
			: this(reader)
		{
			SetInitialLocation(new Location(state.Column, state.Line));
			lastToken = new Token(state.PrevTokenKind, 0, 0);
		}
		public SavepointEventArgs(Location savepointLocation, LexerMemento state)
		{
			this.SavepointLocation = savepointLocation;
			this.State = state;
		}
Example #5
0
 public SavepointEventArgs(Location savepointLocation, LexerMemento state)
 {
     this.SavepointLocation = savepointLocation;
     this.State             = state;
 }