mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2024-11-24 06:18:44 +01:00
comment out tokens that aren't needed yet
This commit is contained in:
parent
b50fb5ed06
commit
0ce869e859
84
src/lexer.rs
84
src/lexer.rs
|
@ -11,48 +11,48 @@ pub enum Token<'a> {
|
||||||
FloatLiteral(f64),
|
FloatLiteral(f64),
|
||||||
#[regex(r#""([^"\\]|\\["\\bnfrt]|u[a-fA-F0-9]{4})*""#, |lex| lex.slice().to_owned())]
|
#[regex(r#""([^"\\]|\\["\\bnfrt]|u[a-fA-F0-9]{4})*""#, |lex| lex.slice().to_owned())]
|
||||||
StringLiteral(String),
|
StringLiteral(String),
|
||||||
#[token("def")]
|
|
||||||
Define,
|
|
||||||
#[token("type")]
|
|
||||||
Type,
|
|
||||||
#[token("->")]
|
|
||||||
RightArrow,
|
|
||||||
#[token("|")]
|
#[token("|")]
|
||||||
Pipe,
|
Pipe,
|
||||||
#[token("[")]
|
// #[token("def")]
|
||||||
BracketOpening,
|
// Define,
|
||||||
#[token("]")]
|
// #[token("type")]
|
||||||
BracketClosing,
|
// Type,
|
||||||
#[token("(")]
|
// #[token("->")]
|
||||||
ParensOpening,
|
// RightArrow,
|
||||||
#[token(")")]
|
// #[token("[")]
|
||||||
ParensClosing,
|
// BracketOpening,
|
||||||
#[token("{")]
|
// #[token("]")]
|
||||||
BraceOpening,
|
// BracketClosing,
|
||||||
#[token("}")]
|
// #[token("(")]
|
||||||
BraceClosing,
|
// ParensOpening,
|
||||||
#[token("+")]
|
// #[token(")")]
|
||||||
Plus,
|
// ParensClosing,
|
||||||
#[token("-")]
|
// #[token("{")]
|
||||||
Minus,
|
// BraceOpening,
|
||||||
#[token("*")]
|
// #[token("}")]
|
||||||
Multiply,
|
// BraceClosing,
|
||||||
#[token("/")]
|
// #[token("+")]
|
||||||
Divide,
|
// Plus,
|
||||||
#[token("%")]
|
// #[token("-")]
|
||||||
Percent,
|
// Minus,
|
||||||
#[token("&")]
|
// #[token("*")]
|
||||||
Ampersand,
|
// Multiply,
|
||||||
#[token(":")]
|
// #[token("/")]
|
||||||
Colon,
|
// Divide,
|
||||||
#[token(";")]
|
// #[token("%")]
|
||||||
Semicolon,
|
// Percent,
|
||||||
#[token(".")]
|
// #[token("&")]
|
||||||
Dot,
|
// Ampersand,
|
||||||
#[token(",")]
|
// #[token(":")]
|
||||||
Comma,
|
// Colon,
|
||||||
#[token("!")]
|
// #[token(";")]
|
||||||
ExclaimationMark,
|
// Semicolon,
|
||||||
#[token("?")]
|
// #[token(".")]
|
||||||
QuestionMark,
|
// Dot,
|
||||||
|
// #[token(",")]
|
||||||
|
// Comma,
|
||||||
|
// #[token("!")]
|
||||||
|
// ExclaimationMark,
|
||||||
|
// #[token("?")]
|
||||||
|
// QuestionMark,
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,6 @@ pub fn parse_syntax(input: &str) -> Result<Vec<PipelineElement>, Vec<logos::Span
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_toks() {
|
fn test_invalid_toks() {
|
||||||
let test_data = "meow | gay $ error!\\";
|
let test_data = "meow | gay $ error!";
|
||||||
assert_eq!(parse_syntax(test_data), Err(vec![11..12, 19..20]))
|
assert_eq!(parse_syntax(test_data), Err(vec![11..12, 18..19]))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue