Dart Documentationangular.core.parserStaticParser

StaticParser class

class StaticParser implements Parser {
 Map<String, dynamic> _functions;
 Parser _fallbackParser;

 StaticParser(StaticParserFunctions functions,
              DynamicParser this._fallbackParser) {
   assert(functions != null);
   _functions = functions.functions;
 }

 call(String exp) {
   if (exp == null) exp = "";
   if (!_functions.containsKey(exp)) {
     //print("Expression [$exp] is not supported in static parser");
     return _fallbackParser.call(exp);
   }
   return _functions[exp];
 }

 primaryFromToken(Token token, parserError) {
   throw 'Not Implemented';
 }
}

Implements

Parser

Constructors

new StaticParser(StaticParserFunctions functions, DynamicParser _fallbackParser) #

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
StaticParser(StaticParserFunctions functions,
            DynamicParser this._fallbackParser) {
 assert(functions != null);
 _functions = functions.functions;
}

Methods

dynamic call(String exp) #

call(String exp) {
 if (exp == null) exp = "";
 if (!_functions.containsKey(exp)) {
   //print("Expression [$exp] is not supported in static parser");
   return _fallbackParser.call(exp);
 }
 return _functions[exp];
}

dynamic primaryFromToken(Token token, parserError) #

primaryFromToken(Token token, parserError) {
 throw 'Not Implemented';
}