MCPcopy Index your code
hub / github.com/endbasic/endbasic / ts

Function ts

core/src/lexer.rs:790–792  ·  view source on GitHub ↗

Syntactic sugar to instantiate a `TokenSpan` for testing.

(token: Token, line: usize, col: usize, length: usize)

Source from the content-addressed store, hash-verified

788
789 /// Syntactic sugar to instantiate a `TokenSpan` for testing.
790 fn ts(token: Token, line: usize, col: usize, length: usize) -> TokenSpan {
791 TokenSpan::new(token, LineCol { line, col }, length)
792 }
793
794 impl fmt::Debug for TokenSpan {
795 /// Mimic the way we write the tests with the `ts` helper in `TokenSpan` dumps.

Callers 15

test_read_past_eofFunction · 0.85
test_whitespace_onlyFunction · 0.85
test_multiple_linesFunction · 0.85
test_tabsFunction · 0.85
test_some_tokensFunction · 0.85
test_boolean_literalsFunction · 0.85
test_integer_literalsFunction · 0.85
test_utf8Function · 0.85
test_remarksFunction · 0.85
test_shebangFunction · 0.85
test_invalid_hashesFunction · 0.85
test_var_typesFunction · 0.85

Calls

no outgoing calls

Tested by 15

test_read_past_eofFunction · 0.68
test_whitespace_onlyFunction · 0.68
test_multiple_linesFunction · 0.68
test_tabsFunction · 0.68
test_some_tokensFunction · 0.68
test_boolean_literalsFunction · 0.68
test_integer_literalsFunction · 0.68
test_utf8Function · 0.68
test_remarksFunction · 0.68
test_shebangFunction · 0.68
test_invalid_hashesFunction · 0.68
test_var_typesFunction · 0.68