Skip to content

Commit 5b3322e

Browse files
committed
progress
1 parent 0ce7203 commit 5b3322e

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

crates/pgt_lexer_new/src/diagnostics.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

crates/pgt_lexer_new/src/lexed.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pgt_diagnostics::MessageAndDescription;
1+
use pgt_diagnostics::{Diagnostic, MessageAndDescription};
22
use pgt_text_size::TextRange;
33

44
use crate::SyntaxKind;
@@ -11,11 +11,14 @@ pub struct LexError {
1111
}
1212

1313
/// A specialized diagnostic for lex errors.
14-
#[derive(Clone, Debug, PartialEq)]
14+
#[derive(Clone, Debug, Diagnostic, PartialEq)]
15+
#[diagnostic(category = "syntax", severity = Error)]
1516
pub struct LexDiagnostic {
16-
/// The location where the error occurred
17+
/// The location where the error is occurred
18+
#[location(span)]
1719
pub span: TextRange,
18-
/// The error message
20+
#[message]
21+
#[description]
1922
pub message: MessageAndDescription,
2023
}
2124

crates/pgt_lexer_new/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
mod codegen;
2-
mod diagnostics;
32
mod lexed;
43
mod lexer;
54

0 commit comments

Comments
 (0)