MCPcopy Create free account
hub / github.com/ReTeX/ReX / expect_type

Function expect_type

src/parser/engine.rs:351–362  ·  view source on GitHub ↗

This method expects that the current token has a given atom type. This method will frist strip all whitespaces first before inspecting the current token. This function will Err if the expected symbol doesn't have the given type, otherwise it will return `Ok`. This function _will_ advance the lexer.

(lex: &mut Lexer, local: Style, expected: AtomType)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

delimiter_sizeFunction · 0.85

Calls 2

consume_whitespaceMethod · 0.80
symbolFunction · 0.70

Tested by

no test coverage detected