Mono.TextTemplating.Tokeniser.NextStateInContent C# (CSharp) Méthode

NextStateInContent() private méthode

private NextStateInContent ( ) : State
Résultat State
		State NextStateInContent ()
		{
			int start = position;
			for (; position < content.Length; position++) {
				char c = content[position];
				nextStateTagStartLocation = nextStateLocation;
				nextStateLocation = nextStateLocation.AddCol ();
				if (c == '\r') {
					if (position + 1 < content.Length && content[position + 1] == '\n')
						position++;
					nextStateLocation = nextStateLocation.AddLine();
				} else if (c == '\n') {
					nextStateLocation = nextStateLocation.AddLine();
				} else if (c =='<' && position + 2 < content.Length && content[position+1] == '#') {
					TagEndLocation = nextStateLocation;
					char type = content[position+2];
					if (type == '@') {
						nextStateLocation = nextStateLocation.AddCols (2);
						value = content.Substring (start, position - start);
						position += 3;
						return State.Directive;
					} else if (type == '=') {
						nextStateLocation = nextStateLocation.AddCols (2);
						value = content.Substring (start, position - start);
						position += 3;
						return State.Expression;
					} else if (type == '+') {
						nextStateLocation = nextStateLocation.AddCols (2);
						value = content.Substring (start, position - start);
						position += 3;
						return State.Helper;
					}  else {
						value = content.Substring (start, position - start);
						nextStateLocation = nextStateLocation.AddCol ();
						position += 2;
						return State.Block;
					}
				}
			}
			//EOF is only valid when we're in content
			value = content.Substring (start);
			return State.EOF;
		}