comment out tokens that aren't needed yet

This commit is contained in:
Schrottkatze 2023-11-19 16:49:27 +01:00
parent b50fb5ed06
commit 0ce869e859
2 changed files with 44 additions and 44 deletions

View file

@ -11,48 +11,48 @@ pub enum Token<'a> {
FloatLiteral(f64),
#[regex(r#""([^"\\]|\\["\\bnfrt]|u[a-fA-F0-9]{4})*""#, |lex| lex.slice().to_owned())]
StringLiteral(String),
#[token("def")]
Define,
#[token("type")]
Type,
#[token("->")]
RightArrow,
#[token("|")]
Pipe,
#[token("[")]
BracketOpening,
#[token("]")]
BracketClosing,
#[token("(")]
ParensOpening,
#[token(")")]
ParensClosing,
#[token("{")]
BraceOpening,
#[token("}")]
BraceClosing,
#[token("+")]
Plus,
#[token("-")]
Minus,
#[token("*")]
Multiply,
#[token("/")]
Divide,
#[token("%")]
Percent,
#[token("&")]
Ampersand,
#[token(":")]
Colon,
#[token(";")]
Semicolon,
#[token(".")]
Dot,
#[token(",")]
Comma,
#[token("!")]
ExclaimationMark,
#[token("?")]
QuestionMark,
// #[token("def")]
// Define,
// #[token("type")]
// Type,
// #[token("->")]
// RightArrow,
// #[token("[")]
// BracketOpening,
// #[token("]")]
// BracketClosing,
// #[token("(")]
// ParensOpening,
// #[token(")")]
// ParensClosing,
// #[token("{")]
// BraceOpening,
// #[token("}")]
// BraceClosing,
// #[token("+")]
// Plus,
// #[token("-")]
// Minus,
// #[token("*")]
// Multiply,
// #[token("/")]
// Divide,
// #[token("%")]
// Percent,
// #[token("&")]
// Ampersand,
// #[token(":")]
// Colon,
// #[token(";")]
// Semicolon,
// #[token(".")]
// Dot,
// #[token(",")]
// Comma,
// #[token("!")]
// ExclaimationMark,
// #[token("?")]
// QuestionMark,
}

View file

@ -102,6 +102,6 @@ pub fn parse_syntax(input: &str) -> Result<Vec<PipelineElement>, Vec<logos::Span
#[test]
fn test_invalid_toks() {
let test_data = "meow | gay $ error!\\";
assert_eq!(parse_syntax(test_data), Err(vec![11..12, 19..20]))
let test_data = "meow | gay $ error!";
assert_eq!(parse_syntax(test_data), Err(vec![11..12, 18..19]))
}