コード例 #1
0
		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.");
		}
コード例 #2
0
ファイル: AbstractLexer.cs プロジェクト: zz0813/Reflexil
 protected AbstractLexer(TextReader reader, LexerMemento state)
     : this(reader)
 {
     SetInitialLocation(new Location(state.Column, state.Line));
     lastToken = new Token(state.PrevTokenKind, 0, 0);
 }
コード例 #3
0
		protected AbstractLexer(TextReader reader, LexerMemento state)
			: this(reader)
		{
			SetInitialLocation(new Location(state.Column, state.Line));
			lastToken = new Token(state.PrevTokenKind, 0, 0);
		}
コード例 #4
0
		public SavepointEventArgs(Location savepointLocation, LexerMemento state)
		{
			this.SavepointLocation = savepointLocation;
			this.State = state;
		}
コード例 #5
0
ファイル: SavepointEventArgs.cs プロジェクト: soshan10/AI
 public SavepointEventArgs(Location savepointLocation, LexerMemento state)
 {
     this.SavepointLocation = savepointLocation;
     this.State             = state;
 }