diff options
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/expr.rs | 4 | ||||
| -rw-r--r-- | src/syntax/lit.rs | 6 | ||||
| -rw-r--r-- | src/syntax/token.rs | 9 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs index 09729f52..91f4053c 100644 --- a/src/syntax/expr.rs +++ b/src/syntax/expr.rs @@ -7,7 +7,7 @@ use super::*; pub enum Expr { /// A literal: `true`, `1cm`, `"hi"`, `{_Hey!_}`. Lit(Lit), - /// An invocation of a function: `[foo: ...]`, `foo(...)`. + /// An invocation of a function: `[foo ...]`, `foo(...)`. Call(ExprCall), /// A unary operation: `-x`. Unary(ExprUnary), @@ -15,7 +15,7 @@ pub enum Expr { Binary(ExprBinary), } -/// An invocation of a function: `[foo: ...]`, `foo(...)`. +/// An invocation of a function: `[foo ...]`, `foo(...)`. #[derive(Debug, Clone, PartialEq)] pub struct ExprCall { /// The name of the function. diff --git a/src/syntax/lit.rs b/src/syntax/lit.rs index e8647965..84d5c6f4 100644 --- a/src/syntax/lit.rs +++ b/src/syntax/lit.rs @@ -27,17 +27,17 @@ pub enum Lit { Color(RgbaColor), /// A string literal: `"hello!"`. Str(String), - /// A dictionary literal: `(false, 12cm, greeting = "hi")`. + /// A dictionary literal: `(false, 12cm, greeting: "hi")`. Dict(LitDict), /// A content literal: `{*Hello* there!}`. Content(SynTree), } -/// A dictionary literal: `(false, 12cm, greeting = "hi")`. +/// A dictionary literal: `(false, 12cm, greeting: "hi")`. #[derive(Debug, Default, Clone, PartialEq)] pub struct LitDict(pub Vec<LitDictEntry>); -/// An entry in a dictionary literal: `false` or `greeting = "hi"`. +/// An entry in a dictionary literal: `false` or `greeting: "hi"`. #[derive(Debug, Clone, PartialEq)] pub struct LitDictEntry { /// The key of the entry if there was one: `greeting`. diff --git a/src/syntax/token.rs b/src/syntax/token.rs index e105ad2f..12f4d10d 100644 --- a/src/syntax/token.rs +++ b/src/syntax/token.rs @@ -54,10 +54,8 @@ pub enum Token<'s> { Colon, /// A comma: `,`. Comma, - /// An equals sign: `=`. - Equals, - /// A double forward chevron: `>>`. - Chain, + /// A pipe: `|`. + Pipe, /// A plus: `+`. Plus, /// A hyphen: `-`. @@ -150,8 +148,7 @@ impl<'s> Token<'s> { Self::Colon => "colon", Self::Comma => "comma", - Self::Equals => "equals sign", - Self::Chain => "function chaining operator", + Self::Pipe => "pipe", Self::Plus => "plus sign", Self::Hyphen => "minus sign", Self::Slash => "slash", |
