summaryrefslogtreecommitdiff
path: root/src/parse/tokens.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-12-27 20:45:20 +0100
committerLaurenz <laurmaedje@gmail.com>2020-12-27 20:45:20 +0100
commitba3d43f7b2a18984be27f3d472884a19f3adce4c (patch)
tree1c6ffa31145fb69c19319440969d2037b27b584f /src/parse/tokens.rs
parent750d220bb080be077cd7ede6d18d485b1c3fb0c9 (diff)
Refresh function call and dictionary syntax
- No colon between function name and arguments, just whitespace - "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
Diffstat (limited to 'src/parse/tokens.rs')
-rw-r--r--src/parse/tokens.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs
index 3dcc6460..c9e159f1 100644
--- a/src/parse/tokens.rs
+++ b/src/parse/tokens.rs
@@ -109,8 +109,7 @@ impl<'s> Iterator for Tokens<'s> {
')' => Token::RightParen,
':' => Token::Colon,
',' => Token::Comma,
- '=' => Token::Equals,
- '>' if self.s.eat_if('>') => Token::Chain,
+ '|' => Token::Pipe,
'+' => Token::Plus,
'-' => Token::Hyphen,
'*' => Token::Star,
@@ -567,7 +566,7 @@ mod tests {
t!(Body[" "]: r"\" => Backslash);
// Test header symbols.
- t!(Body[" /"]: ":,=>>/+-" => T(":,=>>/+-"));
+ t!(Body[" /"]: ":,=|/+-" => T(":,=|/+-"));
}
#[test]
@@ -652,8 +651,7 @@ mod tests {
// Test structural tokens.
t!(Header: ":" => Colon);
t!(Header: "," => Comma);
- t!(Header: "=" => Equals);
- t!(Header: ">>" => Chain);
+ t!(Header: "|" => Pipe);
t!(Header: "+" => Plus);
t!(Header: "-" => Hyphen);
t!(Header[" a1"]: "*" => Star);