MCPcopy
hub / github.com/lutzroeder/netron / accept

Method accept

source/python.js:1790–1797  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

1788 return false;
1789 }
1790 accept(type, value) {
1791 const token = this.peek();
1792 if (token.type === type && (!value || token.value === value)) {
1793 this.read();
1794 return true;
1795 }
1796 return false;
1797 }
1798 expect(type, value) {
1799 const token = this.peek();
1800 if (token.type !== type) {

Callers 12

parseMethod · 0.45
_parseSuiteMethod · 0.45
_parseStatementMethod · 0.45
_parseExpressionMethod · 0.45
_decoratorMethod · 0.45
_parseGeneratorsMethod · 0.45
_parseListMethod · 0.45
_parseSliceMethod · 0.45
_parseDottedNameMethod · 0.45
_parseTypeArgumentsMethod · 0.45
readMethod · 0.45
_parseArgumentsMethod · 0.45

Calls 2

peekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected