MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / syntax_error_unexpected_char

Function syntax_error_unexpected_char

src/parser/error_format.rs:422–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

420
421 #[test]
422 fn syntax_error_unexpected_char() {
423 let file_id = FileId::new("test.php");
424 let err = ParseError::SyntaxError(SyntaxError::UnexpectedToken(file_id, b'#', pos(5)));
425 let msg = format_parse_error(&err);
426 assert_eq!(msg, "Syntax error: unexpected character `#`");
427 }
428
429 #[test]
430 fn syntax_error_unrecognized_char() {

Callers

nothing calls this directly

Calls 2

posFunction · 0.85
format_parse_errorFunction · 0.85

Tested by

no test coverage detected