MCPcopy Create free account
hub / github.com/aurelia/binding / opt

Method opt

src/parser.js:541–548  ·  view source on GitHub ↗

Consumes the current token if it matches the provided one and returns true, otherwise returns false

(token)

Source from the content-addressed store, hash-verified

539
540 /** Consumes the current token if it matches the provided one and returns true, otherwise returns false */
541 opt(token) {
542 if (this.tkn === token) {
543 this.nextToken();
544 return true;
545 }
546
547 return false;
548 }
549
550 /** Consumes the current token if it matches the provided one, otherwise throws */
551 expect(token) {

Callers 5

parseBindingBehaviorMethod · 0.95
parseValueConverterMethod · 0.95
parseVariadicArgsMethod · 0.95
parseConditionalMethod · 0.95
parseLeftHandSideMethod · 0.95

Calls 1

nextTokenMethod · 0.95

Tested by

no test coverage detected