public void MarkAndRollback2() { Scanner scanner = CreateScanner("bar["); ScannerMark mark = scanner.Mark(); VerifyNext(scanner, TokenType.Word, "bar"); VerifyNext(scanner, TokenType.BracketOpen); scanner.Rollback(mark); VerifyNext(scanner, TokenType.Word, "bar"); VerifyNext(scanner, TokenType.BracketOpen); }
public void MarkAndRollback1() { Scanner scanner = CreateScanner("bar()foo"); VerifyNext(scanner, TokenType.Word, "bar"); ScannerMark mark = scanner.Mark(); VerifyNext(scanner, TokenType.ParenOpen); scanner.Rollback(mark); VerifyNext(scanner, TokenType.ParenOpen); VerifyNext(scanner, TokenType.ParenClose); VerifyNext(scanner, TokenType.Word, "foo"); }