Dart Documentationangular.core.parserToken

Token class

class Token {
 final int index;
 final String text;

 var value;
 // Tokens should have one of these set.
 String opKey;
 String key;

 Token(this.index, this.text);

 withOp(op) {
   this.opKey = op;
 }

 withGetterSetter(key) {
   this.key = key;
 }

 withValue(value) { this.value = value; }

 toString() => "Token($text)";
}

Constructors

new Token(int index, String text) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Token(this.index, this.text);

Properties

final int index #

final int index

String key #

String key

String opKey #

String opKey

final String text #

final String text

var value #

var value

Methods

dynamic toString() #

Returns a string representation of this object.

docs inherited from Object
toString() => "Token($text)";

dynamic withGetterSetter(key) #

withGetterSetter(key) {
 this.key = key;
}

dynamic withOp(op) #

withOp(op) {
 this.opKey = op;
}

dynamic withValue(value) #

withValue(value) { this.value = value; }