diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-02-03 12:22:02 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-02-03 12:22:02 +0100 |
| commit | 3150fd56437ecf8b2a5902c18e3f9ace800b768c (patch) | |
| tree | db8a7e9fc868145804db97da81bd0669aaf55454 /src/syntax/mod.rs | |
| parent | 40ea35cbe7482ce04096c4d63a848c8601cc1848 (diff) | |
Better Debug/Display and Derives 🧽
Diffstat (limited to 'src/syntax/mod.rs')
| -rw-r--r-- | src/syntax/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index 9d83e546..7f4052ab 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -30,7 +30,7 @@ pub trait Model: Debug + ModelBounds { } /// A tree representation of source code. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Default, Clone, PartialEq)] pub struct SyntaxModel { /// The syntactical elements making up this model. pub nodes: SpanVec<Node>, @@ -97,7 +97,7 @@ impl PartialEq for Node { } /// Decorations for semantic syntax highlighting. -#[derive(Debug, Copy, Clone, Eq, PartialEq, Serialize)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Serialize)] #[serde(rename_all = "camelCase")] pub enum Decoration { /// A valid function name: |
