fail() public method

public fail ( string fmt ) : ParseException
fmt string
return LispEngine.Parsing.ParseException
Beispiel #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");
 }
Beispiel #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");
 }