API Reference 0.7.1rikulo_view_selectSelectorParseException

SelectorParseException class

class SelectorParseException implements Exception {
 
 final String source;
 final Token token;
 final int index;
 
 SelectorParseException.unexpectedChar(this.source, this.index) : token = null;
 
 SelectorParseException.unexpectedToken(this.source, Token token) : 
   this.token = token, index = token.start;
 
 SelectorParseException.unexpectedEnding(this.source) :
   this.token = null, index = -1;
 
 String toString() => token == null ? (index < 0 ?
     "Unexpected end of selector: ${this.source}" :
     "Unexpected character at ${this.index} in selector ${this.source}") :
     "Unexpected token ${this.token.type} at ${this.index} in selector ${this.source}";
 
}

Implements

Exception

Constructors

new SelectorParseException.unexpectedChar(String source, int index) #

SelectorParseException.unexpectedChar(this.source, this.index) : token = null;

new SelectorParseException.unexpectedEnding(String source) #

SelectorParseException.unexpectedEnding(this.source) :
 this.token = null, index = -1;

new SelectorParseException.unexpectedToken(String source, Token token) #

SelectorParseException.unexpectedToken(this.source, Token token) : 
 this.token = token, index = token.start;

Properties

final int index #

final int index

final String source #

final String source

final Token token #

final Token token

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => token == null ? (index < 0 ?
   "Unexpected end of selector: ${this.source}" :
   "Unexpected character at ${this.index} in selector ${this.source}") :
   "Unexpected token ${this.token.type} at ${this.index} in selector ${this.source}";