From 0c7d16b61af4ff0e3e24720054f03e223d1d6834 Mon Sep 17 00:00:00 2001 From: "Jeong, YunWon" <69878+youknowone@users.noreply.github.com> Date: Tue, 16 May 2023 16:08:25 +0900 Subject: [PATCH] Add is_* methods to Tok (#39) --- parser/Cargo.toml | 1 + parser/src/token.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 700bd7d..03c933f 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -26,6 +26,7 @@ rustpython-ast = { workspace = true } rustpython-parser-core = { workspace = true } itertools = { workspace = true } +is-macro = { workspace = true } log = { workspace = true } num-bigint = { workspace = true } num-traits = { workspace = true } diff --git a/parser/src/token.rs b/parser/src/token.rs index db5409c..e09b5b0 100644 --- a/parser/src/token.rs +++ b/parser/src/token.rs @@ -9,7 +9,7 @@ use num_bigint::BigInt; use std::fmt; /// The set of tokens the Python source code can be tokenized in. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, is_macro::Is)] pub enum Tok { /// Token value for a name, commonly known as an identifier. Name {