Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix serde not compiling for struct with lifetime #70

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/compiling/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ pub enum ScopingMode {
/// # }
/// ```
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Compiler {
/// Name of your language
pub name: String,
Expand Down
6 changes: 1 addition & 5 deletions src/compiling/lexing/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ use super::{
LexerError, LexerErrorType,
};

#[cfg(feature = "serde")]
use serde::{Serialize, Deserialize};

/// Lexer
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Lexer {
rules: Rules,
/// Path to the lexed file
Expand All @@ -32,7 +28,7 @@ pub struct Lexer {
pub scoping_mode: ScopingMode,
}

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
// #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
b1ek marked this conversation as resolved.
Show resolved Hide resolved
struct LexState {
word: String,
is_indenting: bool,
Expand Down
5 changes: 0 additions & 5 deletions src/compiling/lexing/reader.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#[cfg(feature = "serde")]
use serde::{Serialize, Deserialize};

const BEGINNING: (usize, usize) = (0, 1);

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum ReadMode {
History,
Future
}

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Reader {
pub code: String,
Ph0enixKM marked this conversation as resolved.
Show resolved Hide resolved
pub row: usize,
Expand Down
Loading