summaryrefslogtreecommitdiff
path: root/src/syntax/kind.rs
diff options
context:
space:
mode:
authorMarmare314 <49279081+Marmare314@users.noreply.github.com>2023-04-16 14:34:57 +0200
committerGitHub <noreply@github.com>2023-04-16 14:34:57 +0200
commit428c55b6eed3536bb228924c6fb0ad6cea6d6d4b (patch)
tree22180a1cd0ed592e63f05486ea7d827fdc8b6621 /src/syntax/kind.rs
parentd2784f6f9040b280ce9930d8875b33fa034b7dd5 (diff)
refactor SyntaxKind::Pattern (#831)
Diffstat (limited to 'src/syntax/kind.rs')
-rw-r--r--src/syntax/kind.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/syntax/kind.rs b/src/syntax/kind.rs
index fcde2bb4..d35901b0 100644
--- a/src/syntax/kind.rs
+++ b/src/syntax/kind.rs
@@ -230,8 +230,6 @@ pub enum SyntaxKind {
WhileLoop,
/// A for loop: `for x in y { z }`.
ForLoop,
- /// A for loop's destructuring pattern: `x` or `x, y`.
- ForPattern,
/// A module import: `import a, b, c from "utils.typ"`.
ModuleImport,
/// Items to import from a module: `a, b, c`.
@@ -244,8 +242,8 @@ pub enum SyntaxKind {
LoopContinue,
/// A return from a function: `return`, `return x + 1`.
FuncReturn,
- /// A destructuring pattern: `x`, `(x, _, ..y)`.
- Pattern,
+ /// A destructuring pattern: `(x, _, ..y)`.
+ Destructuring,
/// A line comment: `// ...`.
LineComment,
@@ -425,14 +423,13 @@ impl SyntaxKind {
Self::Conditional => "`if` expression",
Self::WhileLoop => "while-loop expression",
Self::ForLoop => "for-loop expression",
- Self::ForPattern => "for-loop destructuring pattern",
Self::ModuleImport => "`import` expression",
Self::ImportItems => "import items",
Self::ModuleInclude => "`include` expression",
Self::LoopBreak => "`break` expression",
Self::LoopContinue => "`continue` expression",
Self::FuncReturn => "`return` expression",
- Self::Pattern => "destructuring pattern",
+ Self::Destructuring => "destructuring pattern",
Self::LineComment => "line comment",
Self::BlockComment => "block comment",
Self::Error => "syntax error",