Mark() 공개 메소드

public Mark ( ) : YamlDotNet.Core.Mark
리턴 YamlDotNet.Core.Mark
예제 #1
0
		public void ShouldProvideAnOneIndexedMark()
		{
			var cursor = new Cursor();

			var result = cursor.Mark();

			result.Line.Should().Be(1, "the mark should be at line 1");
			result.Column.Should().Be(1, "the mark should be at column 1");
		}
예제 #2
0
 private void StaleSimpleKeys()
 {
     foreach (SimpleKey simpleKey in simpleKeys)
     {
         if (simpleKey.IsPossible && (simpleKey.Line < cursor.Line || simpleKey.Index + 1024 < cursor.Index))
         {
             if (simpleKey.IsRequired)
             {
                 Mark mark = cursor.Mark();
                 throw new SyntaxErrorException(mark, mark, "While scanning a simple key, could not find expected ':'.");
             }
             simpleKey.IsPossible = false;
         }
     }
 }