fail() 공개 메소드

public fail ( string fmt ) : ParseException
fmt string
리턴 LispEngine.Parsing.ParseException
예제 #1
0
 // TODO:
 // WE should implement actual reader macros for this part of things.
 private static TokenType?matchHash(Scanner s)
 {
     if (s.peek() != '#')
     {
         return(null);
     }
     s.readChar();
     if (s.peek() == '(')
     {
         s.readChar();
         return(TokenType.VectorOpen);
     }
     if (s.isOneOf("tfTF"))
     {
         s.readChar();
         return(TokenType.Boolean);
     }
     throw s.fail("Unrecognized token");
 }
예제 #2
0
 // TODO:
 // WE should implement actual reader macros for this part of things.
 private static TokenType? matchHash(Scanner s)
 {
     if (s.peek() != '#')
         return null;
     s.readChar();
     if(s.peek() == '(')
     {
         s.readChar();
         return TokenType.VectorOpen;
     }
     if(s.isOneOf("tfTF"))
     {
         s.readChar();
         return TokenType.Boolean;
     }
     throw s.fail("Unrecognized token");
 }