From 185cc27b4c1ed2d98822feccb2141fb3f69c336c Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 20 Jan 2026 11:55:13 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"build(deps):=20Update=20tree-sitter?= =?UTF-8?q?=20to=200.26.3=20and=20related=20dependencies=20(#=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 121ed9add9839c8d005d73a997fba22639425786. --- Cargo.toml | 8 +- enums/Cargo.toml | 10 +- src/languages/language_javascript.rs | 504 ++++++++++---------- src/languages/language_python.rs | 276 +++++------ src/languages/language_rust.rs | 678 +++++++++++++-------------- src/node.rs | 2 +- tree-sitter-ccomment/Cargo.toml | 2 +- tree-sitter-mozcpp/Cargo.toml | 2 +- tree-sitter-mozjs/Cargo.toml | 4 +- tree-sitter-preproc/Cargo.toml | 2 +- 10 files changed, 738 insertions(+), 750 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 70317840d..7a5c1bda0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,13 +24,13 @@ serde = { version = "^1.0", features = ["derive"] } termcolor = "^1.2" walkdir = "^2.3" -tree-sitter = "=0.26.3" +tree-sitter = "=0.25.3" tree-sitter-java = "=0.23.5" tree-sitter-kotlin-ng = "1.1.0" tree-sitter-typescript = "=0.23.2" -tree-sitter-javascript = "=0.25.0" -tree-sitter-python = "=0.25.0" -tree-sitter-rust = "=0.24.0" +tree-sitter-javascript = "=0.23.1" +tree-sitter-python = "=0.23.6" +tree-sitter-rust = "=0.23.2" tree-sitter-preproc = { path = "./tree-sitter-preproc", version = "=0.20.3" } tree-sitter-ccomment = { path = "./tree-sitter-ccomment", version = "=0.20.3" } tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.20.4" } diff --git a/enums/Cargo.toml b/enums/Cargo.toml index c6f7ae1af..d2dcc438e 100644 --- a/enums/Cargo.toml +++ b/enums/Cargo.toml @@ -6,15 +6,15 @@ edition = "2024" [dependencies] clap = { version = "^4.0", features = ["derive"] } -askama = "^0.15" +askama = "^0.14" -tree-sitter = "=0.26.3" +tree-sitter = "=0.25.3" tree-sitter-java = "=0.23.5" tree-sitter-kotlin-ng = "1.1.0" tree-sitter-typescript = "=0.23.2" -tree-sitter-javascript = "=0.25.0" -tree-sitter-python = "=0.25.0" -tree-sitter-rust = "=0.24.0" +tree-sitter-javascript = "=0.23.1" +tree-sitter-python = "=0.23.6" +tree-sitter-rust = "=0.23.2" tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.20.3" } tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.20.3" } tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.4" } diff --git a/src/languages/language_javascript.rs b/src/languages/language_javascript.rs index ee5162278..6dbb96069 100644 --- a/src/languages/language_javascript.rs +++ b/src/languages/language_javascript.rs @@ -20,256 +20,254 @@ pub enum Javascript { Var = 13, Let = 14, Const = 15, - Using = 16, - Await = 17, - Of = 18, - Else = 19, - If = 20, - Switch = 21, - For = 22, - LPAREN = 23, - SEMI = 24, - RPAREN = 25, - In = 26, - While = 27, - Do = 28, - Try = 29, - Break = 30, - Continue = 31, - Debugger = 32, - Return = 33, - Throw = 34, - COLON = 35, - Case = 36, - Catch = 37, - Finally = 38, - Yield = 39, - EQ = 40, - LBRACK = 41, - RBRACK = 42, - HtmlCharacterReference = 43, - LT = 44, - GT = 45, - Identifier2 = 46, - DOT = 47, - LTSLASH = 48, - SLASHGT = 49, - DQUOTE = 50, - SQUOTE = 51, - StringFragment = 52, - StringFragment2 = 53, - Class2 = 54, - Extends = 55, - Async = 56, - Function = 57, - EQGT = 58, - OptionalChain = 59, - New = 60, - PLUSEQ = 61, - DASHEQ = 62, - STAREQ = 63, - SLASHEQ = 64, - PERCENTEQ = 65, - CARETEQ = 66, - AMPEQ = 67, - PIPEEQ = 68, - GTGTEQ = 69, - GTGTGTEQ = 70, - LTLTEQ = 71, - STARSTAREQ = 72, - AMPAMPEQ = 73, - PIPEPIPEEQ = 74, - QMARKQMARKEQ = 75, - DOTDOTDOT = 76, - AMPAMP = 77, - PIPEPIPE = 78, - GTGT = 79, - GTGTGT = 80, - LTLT = 81, - AMP = 82, - CARET = 83, - PIPE = 84, - PLUS = 85, - DASH = 86, - SLASH = 87, - PERCENT = 88, - STARSTAR = 89, - LTEQ = 90, - EQEQ = 91, - EQEQEQ = 92, - BANGEQ = 93, - BANGEQEQ = 94, - GTEQ = 95, - QMARKQMARK = 96, - Instanceof = 97, - BANG = 98, - TILDE = 99, - Typeof = 100, - Void = 101, - Delete = 102, - PLUSPLUS = 103, - DASHDASH = 104, - StringFragment3 = 105, - StringFragment4 = 106, - EscapeSequence = 107, - Comment = 108, - BQUOTE = 109, - DOLLARLBRACE = 110, - SLASH2 = 111, - RegexPattern = 112, - RegexFlags = 113, - Number = 114, - PrivatePropertyIdentifier = 115, - Target = 116, - Meta = 117, - This = 118, - Super = 119, - True = 120, - False = 121, - Null = 122, - Undefined = 123, - AT = 124, - Static = 125, - Staticget = 126, - Get = 127, - Set = 128, - AutomaticSemicolon = 129, - StringFragment5 = 130, - QMARK = 131, - HtmlComment = 132, - JsxText = 133, - Program = 134, - ExportStatement = 135, - NamespaceExport = 136, - ExportClause = 137, - ExportSpecifier = 138, - ModuleExportName = 139, - Declaration = 140, - Import = 141, - ImportStatement = 142, - ImportClause = 143, - FromClause = 144, - NamespaceImport = 145, - NamedImports = 146, - ImportSpecifier = 147, - ImportAttribute = 148, - Statement = 149, - ExpressionStatement = 150, - VariableDeclaration = 151, - LexicalDeclaration = 152, - UsingDeclaration = 153, - VariableDeclarator = 154, - StatementBlock = 155, - ElseClause = 156, - IfStatement = 157, - SwitchStatement = 158, - ForStatement = 159, - ForInStatement = 160, - ForHeader = 161, - WhileStatement = 162, - DoStatement = 163, - TryStatement = 164, - WithStatement = 165, - BreakStatement = 166, - ContinueStatement = 167, - DebuggerStatement = 168, - ReturnStatement = 169, - ThrowStatement = 170, - EmptyStatement = 171, - LabeledStatement = 172, - SwitchBody = 173, - SwitchCase = 174, - SwitchDefault = 175, - CatchClause = 176, - FinallyClause = 177, - ParenthesizedExpression = 178, - Expression = 179, - PrimaryExpression = 180, - YieldExpression = 181, - Object = 182, - ObjectPattern = 183, - AssignmentPattern = 184, - ObjectAssignmentPattern = 185, - Array = 186, - ArrayPattern = 187, - JsxElement = 188, - JsxExpression = 189, - JsxOpeningElement = 190, - MemberExpression = 191, - JsxNamespaceName = 192, - JsxClosingElement = 193, - JsxSelfClosingElement = 194, - JsxAttribute = 195, - String = 196, - Class = 197, - ClassDeclaration = 198, - ClassHeritage = 199, - FunctionExpression = 200, - FunctionDeclaration = 201, - GeneratorFunction = 202, - GeneratorFunctionDeclaration = 203, - ArrowFunction = 204, - CallExpression = 205, - NewExpression = 206, - AwaitExpression = 207, - MemberExpression2 = 208, - SubscriptExpression = 209, - AssignmentExpression = 210, - AugmentedAssignmentLhs = 211, - AugmentedAssignmentExpression = 212, - Initializer = 213, - DestructuringPattern = 214, - SpreadElement = 215, - TernaryExpression = 216, - BinaryExpression = 217, - UnaryExpression = 218, - UpdateExpression = 219, - SequenceExpression = 220, - String2 = 221, - TemplateString = 222, - TemplateSubstitution = 223, - Regex = 224, - MetaProperty = 225, - Arguments = 226, - Decorator = 227, - MemberExpression3 = 228, - CallExpression2 = 229, - ClassBody = 230, - FieldDefinition = 231, - FormalParameters = 232, - ClassStaticBlock = 233, - Pattern = 234, - RestPattern = 235, - MethodDefinition = 236, - Pair = 237, - PairPattern = 238, - PropertyName = 239, - ComputedPropertyName = 240, - ProgramRepeat1 = 241, - ExportStatementRepeat1 = 242, - ExportClauseRepeat1 = 243, - NamedImportsRepeat1 = 244, - VariableDeclarationRepeat1 = 245, - SwitchBodyRepeat1 = 246, - ObjectRepeat1 = 247, - ObjectPatternRepeat1 = 248, - ArrayRepeat1 = 249, - ArrayPatternRepeat1 = 250, - JsxElementRepeat1 = 251, - JsxOpeningElementRepeat1 = 252, - JsxStringRepeat1 = 253, - JsxStringRepeat2 = 254, - SequenceExpressionRepeat1 = 255, - StringRepeat1 = 256, - StringRepeat2 = 257, - TemplateStringRepeat1 = 258, - ClassBodyRepeat1 = 259, - FormalParametersRepeat1 = 260, - PropertyIdentifier = 261, - ShorthandPropertyIdentifier = 262, - ShorthandPropertyIdentifierPattern = 263, - StatementIdentifier = 264, - Error = 265, + Else = 16, + If = 17, + Switch = 18, + For = 19, + LPAREN = 20, + SEMI = 21, + RPAREN = 22, + Await = 23, + In = 24, + Of = 25, + While = 26, + Do = 27, + Try = 28, + Break = 29, + Continue = 30, + Debugger = 31, + Return = 32, + Throw = 33, + COLON = 34, + Case = 35, + Catch = 36, + Finally = 37, + Yield = 38, + EQ = 39, + LBRACK = 40, + RBRACK = 41, + HtmlCharacterReference = 42, + LT = 43, + GT = 44, + Identifier2 = 45, + DOT = 46, + LTSLASH = 47, + SLASHGT = 48, + DQUOTE = 49, + SQUOTE = 50, + StringFragment = 51, + StringFragment2 = 52, + Class2 = 53, + Extends = 54, + Async = 55, + Function = 56, + EQGT = 57, + OptionalChain = 58, + New = 59, + PLUSEQ = 60, + DASHEQ = 61, + STAREQ = 62, + SLASHEQ = 63, + PERCENTEQ = 64, + CARETEQ = 65, + AMPEQ = 66, + PIPEEQ = 67, + GTGTEQ = 68, + GTGTGTEQ = 69, + LTLTEQ = 70, + STARSTAREQ = 71, + AMPAMPEQ = 72, + PIPEPIPEEQ = 73, + QMARKQMARKEQ = 74, + DOTDOTDOT = 75, + AMPAMP = 76, + PIPEPIPE = 77, + GTGT = 78, + GTGTGT = 79, + LTLT = 80, + AMP = 81, + CARET = 82, + PIPE = 83, + PLUS = 84, + DASH = 85, + SLASH = 86, + PERCENT = 87, + STARSTAR = 88, + LTEQ = 89, + EQEQ = 90, + EQEQEQ = 91, + BANGEQ = 92, + BANGEQEQ = 93, + GTEQ = 94, + QMARKQMARK = 95, + Instanceof = 96, + BANG = 97, + TILDE = 98, + Typeof = 99, + Void = 100, + Delete = 101, + PLUSPLUS = 102, + DASHDASH = 103, + StringFragment3 = 104, + StringFragment4 = 105, + EscapeSequence = 106, + Comment = 107, + BQUOTE = 108, + DOLLARLBRACE = 109, + SLASH2 = 110, + RegexPattern = 111, + RegexFlags = 112, + Number = 113, + PrivatePropertyIdentifier = 114, + Target = 115, + Meta = 116, + This = 117, + Super = 118, + True = 119, + False = 120, + Null = 121, + Undefined = 122, + AT = 123, + Static = 124, + Staticget = 125, + Get = 126, + Set = 127, + AutomaticSemicolon = 128, + StringFragment5 = 129, + QMARK = 130, + HtmlComment = 131, + JsxText = 132, + Program = 133, + ExportStatement = 134, + NamespaceExport = 135, + ExportClause = 136, + ExportSpecifier = 137, + ModuleExportName = 138, + Declaration = 139, + Import = 140, + ImportStatement = 141, + ImportClause = 142, + FromClause = 143, + NamespaceImport = 144, + NamedImports = 145, + ImportSpecifier = 146, + ImportAttribute = 147, + Statement = 148, + ExpressionStatement = 149, + VariableDeclaration = 150, + LexicalDeclaration = 151, + VariableDeclarator = 152, + StatementBlock = 153, + ElseClause = 154, + IfStatement = 155, + SwitchStatement = 156, + ForStatement = 157, + ForInStatement = 158, + ForHeader = 159, + WhileStatement = 160, + DoStatement = 161, + TryStatement = 162, + WithStatement = 163, + BreakStatement = 164, + ContinueStatement = 165, + DebuggerStatement = 166, + ReturnStatement = 167, + ThrowStatement = 168, + EmptyStatement = 169, + LabeledStatement = 170, + SwitchBody = 171, + SwitchCase = 172, + SwitchDefault = 173, + CatchClause = 174, + FinallyClause = 175, + ParenthesizedExpression = 176, + Expression = 177, + PrimaryExpression = 178, + YieldExpression = 179, + Object = 180, + ObjectPattern = 181, + AssignmentPattern = 182, + ObjectAssignmentPattern = 183, + Array = 184, + ArrayPattern = 185, + JsxElement = 186, + JsxExpression = 187, + JsxOpeningElement = 188, + MemberExpression = 189, + JsxNamespaceName = 190, + JsxClosingElement = 191, + JsxSelfClosingElement = 192, + JsxAttribute = 193, + String = 194, + Class = 195, + ClassDeclaration = 196, + ClassHeritage = 197, + FunctionExpression = 198, + FunctionDeclaration = 199, + GeneratorFunction = 200, + GeneratorFunctionDeclaration = 201, + ArrowFunction = 202, + CallExpression = 203, + NewExpression = 204, + AwaitExpression = 205, + MemberExpression2 = 206, + SubscriptExpression = 207, + AssignmentExpression = 208, + AugmentedAssignmentLhs = 209, + AugmentedAssignmentExpression = 210, + Initializer = 211, + DestructuringPattern = 212, + SpreadElement = 213, + TernaryExpression = 214, + BinaryExpression = 215, + UnaryExpression = 216, + UpdateExpression = 217, + SequenceExpression = 218, + String2 = 219, + TemplateString = 220, + TemplateSubstitution = 221, + Regex = 222, + MetaProperty = 223, + Arguments = 224, + Decorator = 225, + MemberExpression3 = 226, + CallExpression2 = 227, + ClassBody = 228, + FieldDefinition = 229, + FormalParameters = 230, + ClassStaticBlock = 231, + Pattern = 232, + RestPattern = 233, + MethodDefinition = 234, + Pair = 235, + PairPattern = 236, + PropertyName = 237, + ComputedPropertyName = 238, + ProgramRepeat1 = 239, + ExportStatementRepeat1 = 240, + ExportClauseRepeat1 = 241, + NamedImportsRepeat1 = 242, + VariableDeclarationRepeat1 = 243, + SwitchBodyRepeat1 = 244, + ObjectRepeat1 = 245, + ObjectPatternRepeat1 = 246, + ArrayRepeat1 = 247, + ArrayPatternRepeat1 = 248, + JsxElementRepeat1 = 249, + JsxOpeningElementRepeat1 = 250, + JsxStringRepeat1 = 251, + JsxStringRepeat2 = 252, + SequenceExpressionRepeat1 = 253, + StringRepeat1 = 254, + StringRepeat2 = 255, + TemplateStringRepeat1 = 256, + ClassBodyRepeat1 = 257, + FormalParametersRepeat1 = 258, + PropertyIdentifier = 259, + ShorthandPropertyIdentifier = 260, + ShorthandPropertyIdentifierPattern = 261, + StatementIdentifier = 262, + Error = 263, } impl From for &'static str { @@ -292,9 +290,6 @@ impl From for &'static str { Javascript::Var => "var", Javascript::Let => "let", Javascript::Const => "const", - Javascript::Using => "using", - Javascript::Await => "await", - Javascript::Of => "of", Javascript::Else => "else", Javascript::If => "if", Javascript::Switch => "switch", @@ -302,7 +297,9 @@ impl From for &'static str { Javascript::LPAREN => "(", Javascript::SEMI => ";", Javascript::RPAREN => ")", + Javascript::Await => "await", Javascript::In => "in", + Javascript::Of => "of", Javascript::While => "while", Javascript::Do => "do", Javascript::Try => "try", @@ -429,7 +426,6 @@ impl From for &'static str { Javascript::ExpressionStatement => "expression_statement", Javascript::VariableDeclaration => "variable_declaration", Javascript::LexicalDeclaration => "lexical_declaration", - Javascript::UsingDeclaration => "using_declaration", Javascript::VariableDeclarator => "variable_declarator", Javascript::StatementBlock => "statement_block", Javascript::ElseClause => "else_clause", diff --git a/src/languages/language_python.rs b/src/languages/language_python.rs index f2dbb4450..1d12c16d1 100644 --- a/src/languages/language_python.rs +++ b/src/languages/language_python.rs @@ -38,7 +38,7 @@ pub enum Python { While = 31, Try = 32, Except = 33, - STAR2 = 34, + ExceptSTAR = 34, Finally = 35, With = 36, Def = 37, @@ -145,140 +145,141 @@ pub enum Python { WhileStatement = 138, TryStatement = 139, ExceptClause = 140, - FinallyClause = 141, - WithStatement = 142, - WithClause = 143, - WithItem = 144, - FunctionDefinition = 145, - Parameters = 146, - LambdaParameters = 147, - ListSplat = 148, - DictionarySplat = 149, - GlobalStatement = 150, - NonlocalStatement = 151, - ExecStatement = 152, - TypeAliasStatement = 153, - ClassDefinition = 154, - TypeParameter = 155, - ParenthesizedListSplat = 156, - ArgumentList = 157, - DecoratedDefinition = 158, - Decorator = 159, - Block2 = 160, - ExpressionList = 161, - DottedName = 162, - CasePattern = 163, - SimplePattern = 164, - AsPattern = 165, - UnionPattern = 166, - ListPattern = 167, - TuplePattern = 168, - DictPattern = 169, - KeyValuePattern = 170, - KeywordPattern = 171, - SplatPattern = 172, - ClassPattern = 173, - ComplexPattern = 174, - Parameters2 = 175, - Patterns = 176, - Parameter = 177, - Pattern = 178, - TuplePattern2 = 179, - ListPattern2 = 180, - DefaultParameter = 181, - TypedDefaultParameter = 182, - ListSplatPattern = 183, - DictionarySplatPattern = 184, - AsPattern2 = 185, - ExpressionWithinForInClause = 186, - Expression = 187, - PrimaryExpression = 188, - NotOperator = 189, - BooleanOperator = 190, - BinaryOperator = 191, - UnaryOperator = 192, - Notin = 193, - Isnot = 194, - ComparisonOperator = 195, - Lambda = 196, - Lambda2 = 197, - Assignment = 198, - AugmentedAssignment = 199, - PatternList = 200, - RightHandSide = 201, - Yield = 202, - Attribute = 203, - Subscript = 204, - Slice = 205, - Call = 206, - TypedParameter = 207, - Type = 208, - SplatType = 209, - GenericType = 210, - UnionType = 211, - ConstrainedType = 212, - MemberType = 213, - KeywordArgument = 214, - List = 215, - Set = 216, - Tuple = 217, - Dictionary = 218, - Pair = 219, - ListComprehension = 220, - DictionaryComprehension = 221, - SetComprehension = 222, - GeneratorExpression = 223, - ComprehensionClauses = 224, - ParenthesizedExpression = 225, - CollectionElements = 226, - ForInClause = 227, - IfClause = 228, - ConditionalExpression = 229, - ConcatenatedString = 230, - String = 231, - StringContent = 232, - Interpolation = 233, - FExpression = 234, - NotEscapeSequence = 235, - FormatSpecifier = 236, - Await = 237, - PositionalSeparator = 238, - KeywordSeparator = 239, - ModuleRepeat1 = 240, - SimpleStatementsRepeat1 = 241, - ImportPrefixRepeat1 = 242, - ImportListRepeat1 = 243, - PrintStatementRepeat1 = 244, - AssertStatementRepeat1 = 245, - IfStatementRepeat1 = 246, - MatchStatementRepeat1 = 247, - MatchBlockRepeat1 = 248, - CaseClauseRepeat1 = 249, - TryStatementRepeat1 = 250, - ExceptClauseRepeat1 = 251, - WithClauseRepeat1 = 252, - GlobalStatementRepeat1 = 253, - TypeParameterRepeat1 = 254, - ArgumentListRepeat1 = 255, - DecoratedDefinitionRepeat1 = 256, - DottedNameRepeat1 = 257, - UnionPatternRepeat1 = 258, - DictPatternRepeat1 = 259, - ParametersRepeat1 = 260, - PatternsRepeat1 = 261, - ComparisonOperatorRepeat1 = 262, - SubscriptRepeat1 = 263, - DictionaryRepeat1 = 264, - ComprehensionClausesRepeat1 = 265, - CollectionElementsRepeat1 = 266, - ForInClauseRepeat1 = 267, - ConcatenatedStringRepeat1 = 268, - StringRepeat1 = 269, - StringContentRepeat1 = 270, - FormatSpecifierRepeat1 = 271, - AsPatternTarget = 272, - FormatExpression = 273, - Error = 274, + ExceptGroupClause = 141, + FinallyClause = 142, + WithStatement = 143, + WithClause = 144, + WithItem = 145, + FunctionDefinition = 146, + Parameters = 147, + LambdaParameters = 148, + ListSplat = 149, + DictionarySplat = 150, + GlobalStatement = 151, + NonlocalStatement = 152, + ExecStatement = 153, + TypeAliasStatement = 154, + ClassDefinition = 155, + TypeParameter = 156, + ParenthesizedListSplat = 157, + ArgumentList = 158, + DecoratedDefinition = 159, + Decorator = 160, + Block2 = 161, + ExpressionList = 162, + DottedName = 163, + CasePattern = 164, + SimplePattern = 165, + AsPattern = 166, + UnionPattern = 167, + ListPattern = 168, + TuplePattern = 169, + DictPattern = 170, + KeyValuePattern = 171, + KeywordPattern = 172, + SplatPattern = 173, + ClassPattern = 174, + ComplexPattern = 175, + Parameters2 = 176, + Patterns = 177, + Parameter = 178, + Pattern = 179, + TuplePattern2 = 180, + ListPattern2 = 181, + DefaultParameter = 182, + TypedDefaultParameter = 183, + ListSplatPattern = 184, + DictionarySplatPattern = 185, + AsPattern2 = 186, + ExpressionWithinForInClause = 187, + Expression = 188, + PrimaryExpression = 189, + NotOperator = 190, + BooleanOperator = 191, + BinaryOperator = 192, + UnaryOperator = 193, + Notin = 194, + Isnot = 195, + ComparisonOperator = 196, + Lambda = 197, + Lambda2 = 198, + Assignment = 199, + AugmentedAssignment = 200, + PatternList = 201, + RightHandSide = 202, + Yield = 203, + Attribute = 204, + Subscript = 205, + Slice = 206, + Call = 207, + TypedParameter = 208, + Type = 209, + SplatType = 210, + GenericType = 211, + UnionType = 212, + ConstrainedType = 213, + MemberType = 214, + KeywordArgument = 215, + List = 216, + Set = 217, + Tuple = 218, + Dictionary = 219, + Pair = 220, + ListComprehension = 221, + DictionaryComprehension = 222, + SetComprehension = 223, + GeneratorExpression = 224, + ComprehensionClauses = 225, + ParenthesizedExpression = 226, + CollectionElements = 227, + ForInClause = 228, + IfClause = 229, + ConditionalExpression = 230, + ConcatenatedString = 231, + String = 232, + StringContent = 233, + Interpolation = 234, + FExpression = 235, + NotEscapeSequence = 236, + FormatSpecifier = 237, + Await = 238, + PositionalSeparator = 239, + KeywordSeparator = 240, + ModuleRepeat1 = 241, + SimpleStatementsRepeat1 = 242, + ImportPrefixRepeat1 = 243, + ImportListRepeat1 = 244, + PrintStatementRepeat1 = 245, + AssertStatementRepeat1 = 246, + IfStatementRepeat1 = 247, + MatchStatementRepeat1 = 248, + MatchBlockRepeat1 = 249, + CaseClauseRepeat1 = 250, + TryStatementRepeat1 = 251, + TryStatementRepeat2 = 252, + WithClauseRepeat1 = 253, + GlobalStatementRepeat1 = 254, + TypeParameterRepeat1 = 255, + ArgumentListRepeat1 = 256, + DecoratedDefinitionRepeat1 = 257, + DottedNameRepeat1 = 258, + UnionPatternRepeat1 = 259, + DictPatternRepeat1 = 260, + ParametersRepeat1 = 261, + PatternsRepeat1 = 262, + ComparisonOperatorRepeat1 = 263, + SubscriptRepeat1 = 264, + DictionaryRepeat1 = 265, + ComprehensionClausesRepeat1 = 266, + CollectionElementsRepeat1 = 267, + ForInClauseRepeat1 = 268, + ConcatenatedStringRepeat1 = 269, + StringRepeat1 = 270, + StringContentRepeat1 = 271, + FormatSpecifierRepeat1 = 272, + AsPatternTarget = 273, + FormatExpression = 274, + Error = 275, } impl From for &'static str { @@ -319,7 +320,7 @@ impl From for &'static str { Python::While => "while", Python::Try => "try", Python::Except => "except", - Python::STAR2 => "*", + Python::ExceptSTAR => "except*", Python::Finally => "finally", Python::With => "with", Python::Def => "def", @@ -426,6 +427,7 @@ impl From for &'static str { Python::WhileStatement => "while_statement", Python::TryStatement => "try_statement", Python::ExceptClause => "except_clause", + Python::ExceptGroupClause => "except_group_clause", Python::FinallyClause => "finally_clause", Python::WithStatement => "with_statement", Python::WithClause => "with_clause", @@ -536,7 +538,7 @@ impl From for &'static str { Python::MatchBlockRepeat1 => "_match_block_repeat1", Python::CaseClauseRepeat1 => "case_clause_repeat1", Python::TryStatementRepeat1 => "try_statement_repeat1", - Python::ExceptClauseRepeat1 => "except_clause_repeat1", + Python::TryStatementRepeat2 => "try_statement_repeat2", Python::WithClauseRepeat1 => "with_clause_repeat1", Python::GlobalStatementRepeat1 => "global_statement_repeat1", Python::TypeParameterRepeat1 => "type_parameter_repeat1", diff --git a/src/languages/language_rust.rs b/src/languages/language_rust.rs index 456b49b2e..e9b9f8e9a 100644 --- a/src/languages/language_rust.rs +++ b/src/languages/language_rust.rs @@ -23,343 +23,338 @@ pub enum Rust { QMARK = 16, Block2 = 17, Expr = 18, - Expr2021 = 19, - Ident = 20, - Item = 21, - Lifetime2 = 22, - Literal = 23, - Meta = 24, - Pat = 25, - PatParam = 26, - Path = 27, - Stmt = 28, - Tt = 29, - Ty = 30, - Vis = 31, - PrimitiveType = 32, - PrimitiveType2 = 33, - PrimitiveType3 = 34, - PrimitiveType4 = 35, - PrimitiveType5 = 36, - PrimitiveType6 = 37, - PrimitiveType7 = 38, - PrimitiveType8 = 39, - PrimitiveType9 = 40, - PrimitiveType10 = 41, - PrimitiveType11 = 42, - PrimitiveType12 = 43, - PrimitiveType13 = 44, - PrimitiveType14 = 45, - PrimitiveType15 = 46, - PrimitiveType16 = 47, - PrimitiveType17 = 48, - DASH = 49, - SLASH = 50, - PERCENT = 51, - CARET = 52, - BANG = 53, - AMP = 54, - PIPE = 55, - AMPAMP = 56, - PIPEPIPE = 57, - LTLT = 58, - GTGT = 59, - PLUSEQ = 60, - DASHEQ = 61, - STAREQ = 62, - SLASHEQ = 63, - PERCENTEQ = 64, - CARETEQ = 65, - AMPEQ = 66, - PIPEEQ = 67, - LTLTEQ = 68, - GTGTEQ = 69, - EQ = 70, - EQEQ = 71, - BANGEQ = 72, - GT = 73, - LT = 74, - GTEQ = 75, - LTEQ = 76, - AT = 77, - UNDERSCORE = 78, - DOT = 79, - DOTDOT = 80, - DOTDOTDOT = 81, - DOTDOTEQ = 82, - COMMA = 83, - COLONCOLON = 84, - DASHGT = 85, - HASH = 86, - SQUOTE = 87, - As = 88, - Async = 89, - Await = 90, - Break = 91, - Const = 92, - Continue = 93, - Default = 94, - Enum = 95, - Fn = 96, - For = 97, - Gen = 98, - If = 99, - Impl = 100, - Let = 101, - Loop = 102, - Match = 103, - Mod = 104, - Pub = 105, - Return = 106, - Static = 107, - Struct = 108, - Trait = 109, - Type = 110, - Union = 111, - Unsafe = 112, - Use = 113, - Where = 114, - While = 115, - Extern = 116, - Ref = 117, - Else = 118, - In = 119, - LT2 = 120, - Dyn = 121, - MutableSpecifier = 122, - Raw = 123, - Yield = 124, - Move = 125, - Try = 126, - IntegerLiteral = 127, - DQUOTE = 128, - DQUOTE2 = 129, - CharLiteral = 130, - EscapeSequence = 131, - True = 132, - False = 133, - SLASHSLASH = 134, - LineCommentToken1 = 135, - LineCommentToken2 = 136, - LineCommentToken3 = 137, - BANG2 = 138, - SLASH2 = 139, - SLASHSTAR = 140, - STARSLASH = 141, - Shebang = 142, - Zelf = 143, - Super = 144, - Crate = 145, - Metavariable = 146, - StringContent = 147, - RawStringLiteralStart = 148, - StringContent2 = 149, - RawStringLiteralEnd = 150, - FloatLiteral = 151, - OuterDocCommentMarker = 152, - InnerDocCommentMarker = 153, - BlockCommentContent = 154, - DocComment = 155, - ErrorSentinel = 156, - SourceFile = 157, - Statement = 158, - EmptyStatement = 159, - ExpressionStatement = 160, - MacroDefinition = 161, - MacroRule = 162, - TokenPattern = 163, - TokenTreePattern = 164, - TokenBindingPattern = 165, - TokenRepetitionPattern = 166, - FragmentSpecifier = 167, - TokenTree = 168, - TokenRepetition = 169, - AttributeItem = 170, - InnerAttributeItem = 171, - Attribute = 172, - ModItem = 173, - ForeignModItem = 174, - DeclarationList = 175, - StructItem = 176, - UnionItem = 177, - EnumItem = 178, - EnumVariantList = 179, - EnumVariant = 180, - FieldDeclarationList = 181, - FieldDeclaration = 182, - OrderedFieldDeclarationList = 183, - ExternCrateDeclaration = 184, - ConstItem = 185, - StaticItem = 186, - TypeItem = 187, - FunctionItem = 188, - FunctionSignatureItem = 189, - FunctionModifiers = 190, - WhereClause = 191, - WherePredicate = 192, - ImplItem = 193, - TraitItem = 194, - AssociatedType = 195, - TraitBounds = 196, - HigherRankedTraitBound = 197, - RemovedTraitBound = 198, - TypeParameters = 199, - ConstParameter = 200, - TypeParameter = 201, - LifetimeParameter = 202, - LetDeclaration = 203, - UseDeclaration = 204, - UseClause = 205, - ScopedUseList = 206, - UseList = 207, - UseAsClause = 208, - UseWildcard = 209, - Parameters = 210, - SelfParameter = 211, - VariadicParameter = 212, - Parameter = 213, - ExternModifier = 214, - VisibilityModifier = 215, - Type2 = 216, - BracketedType = 217, - QualifiedType = 218, - Lifetime = 219, - ArrayType = 220, - ForLifetimes = 221, - FunctionType = 222, - TupleType = 223, - UnitType = 224, - GenericFunction = 225, - GenericType = 226, - GenericTypeWithTurbofish = 227, - BoundedType = 228, - UseBounds = 229, - TypeArguments = 230, - TypeBinding = 231, - ReferenceType = 232, - PointerType = 233, - NeverType = 234, - AbstractType = 235, - DynamicType = 236, - ExpressionExceptRange = 237, - Expression = 238, - MacroInvocation = 239, - TokenTree2 = 240, - DelimTokens = 241, - NonDelimToken = 242, - ScopedIdentifier = 243, - ScopedTypeIdentifier = 244, - ScopedTypeIdentifier2 = 245, - RangeExpression = 246, - UnaryExpression = 247, - TryExpression = 248, - ReferenceExpression = 249, - BinaryExpression = 250, - AssignmentExpression = 251, - CompoundAssignmentExpr = 252, - TypeCastExpression = 253, - ReturnExpression = 254, - YieldExpression = 255, - CallExpression = 256, - Arguments = 257, - ArrayExpression = 258, - ParenthesizedExpression = 259, - TupleExpression = 260, - UnitExpression = 261, - StructExpression = 262, - FieldInitializerList = 263, - ShorthandFieldInitializer = 264, - FieldInitializer = 265, - BaseFieldInitializer = 266, - IfExpression = 267, - LetCondition = 268, - LetChain2 = 269, - Condition = 270, - ElseClause = 271, - MatchExpression = 272, - MatchBlock = 273, - MatchArm = 274, - MatchArm2 = 275, - MatchPattern = 276, - WhileExpression = 277, - LoopExpression = 278, - ForExpression = 279, - ConstBlock = 280, - ClosureExpression = 281, - ClosureParameters = 282, - Label = 283, - BreakExpression = 284, - ContinueExpression = 285, - IndexExpression = 286, - AwaitExpression = 287, - FieldExpression = 288, - UnsafeBlock = 289, - AsyncBlock = 290, - GenBlock = 291, - TryBlock = 292, - Block = 293, - Pattern = 294, - GenericPattern = 295, - TuplePattern = 296, - SlicePattern = 297, - TupleStructPattern = 298, - StructPattern = 299, - FieldPattern = 300, - RemainingFieldPattern = 301, - MutPattern = 302, - RangePattern = 303, - RefPattern = 304, - CapturedPattern = 305, - ReferencePattern = 306, - OrPattern = 307, - Literal2 = 308, - LiteralPattern = 309, - NegativeLiteral = 310, - StringLiteral = 311, - RawStringLiteral = 312, - BooleanLiteral = 313, - LineComment = 314, - LineDocCommentMarker = 315, - InnerDocCommentMarker2 = 316, - OuterDocCommentMarker2 = 317, - BlockComment = 318, - BlockDocCommentMarker = 319, - SourceFileRepeat1 = 320, - MacroDefinitionRepeat1 = 321, - TokenTreePatternRepeat1 = 322, - TokenTreeRepeat1 = 323, - NonSpecialTokenRepeat1 = 324, - DeclarationListRepeat1 = 325, - EnumVariantListRepeat1 = 326, - EnumVariantListRepeat2 = 327, - FieldDeclarationListRepeat1 = 328, - OrderedFieldDeclarationListRepeat1 = 329, - FunctionModifiersRepeat1 = 330, - WhereClauseRepeat1 = 331, - TraitBoundsRepeat1 = 332, - TypeParametersRepeat1 = 333, - UseListRepeat1 = 334, - ParametersRepeat1 = 335, - ForLifetimesRepeat1 = 336, - TupleTypeRepeat1 = 337, - UseBoundsRepeat1 = 338, - TypeArgumentsRepeat1 = 339, - DelimTokenTreeRepeat1 = 340, - ArgumentsRepeat1 = 341, - TupleExpressionRepeat1 = 342, - FieldInitializerListRepeat1 = 343, - MatchBlockRepeat1 = 344, - MatchArmRepeat1 = 345, - ClosureParametersRepeat1 = 346, - TuplePatternRepeat1 = 347, - SlicePatternRepeat1 = 348, - StructPatternRepeat1 = 349, - StringLiteralRepeat1 = 350, - FieldIdentifier = 351, - LetChain = 352, - ShorthandFieldIdentifier = 353, - TypeIdentifier = 354, - Error = 355, + Ident = 19, + Item = 20, + Lifetime2 = 21, + Literal = 22, + Meta = 23, + Pat = 24, + Path = 25, + Stmt = 26, + Tt = 27, + Ty = 28, + Vis = 29, + PrimitiveType = 30, + PrimitiveType2 = 31, + PrimitiveType3 = 32, + PrimitiveType4 = 33, + PrimitiveType5 = 34, + PrimitiveType6 = 35, + PrimitiveType7 = 36, + PrimitiveType8 = 37, + PrimitiveType9 = 38, + PrimitiveType10 = 39, + PrimitiveType11 = 40, + PrimitiveType12 = 41, + PrimitiveType13 = 42, + PrimitiveType14 = 43, + PrimitiveType15 = 44, + PrimitiveType16 = 45, + PrimitiveType17 = 46, + DASH = 47, + SLASH = 48, + PERCENT = 49, + CARET = 50, + BANG = 51, + AMP = 52, + PIPE = 53, + AMPAMP = 54, + PIPEPIPE = 55, + LTLT = 56, + GTGT = 57, + PLUSEQ = 58, + DASHEQ = 59, + STAREQ = 60, + SLASHEQ = 61, + PERCENTEQ = 62, + CARETEQ = 63, + AMPEQ = 64, + PIPEEQ = 65, + LTLTEQ = 66, + GTGTEQ = 67, + EQ = 68, + EQEQ = 69, + BANGEQ = 70, + GT = 71, + LT = 72, + GTEQ = 73, + LTEQ = 74, + AT = 75, + UNDERSCORE = 76, + DOT = 77, + DOTDOT = 78, + DOTDOTDOT = 79, + DOTDOTEQ = 80, + COMMA = 81, + COLONCOLON = 82, + DASHGT = 83, + HASH = 84, + SQUOTE = 85, + As = 86, + Async = 87, + Await = 88, + Break = 89, + Const = 90, + Continue = 91, + Default = 92, + Enum = 93, + Fn = 94, + For = 95, + Gen = 96, + If = 97, + Impl = 98, + Let = 99, + Loop = 100, + Match = 101, + Mod = 102, + Pub = 103, + Return = 104, + Static = 105, + Struct = 106, + Trait = 107, + Type = 108, + Union = 109, + Unsafe = 110, + Use = 111, + Where = 112, + While = 113, + Extern = 114, + Ref = 115, + Else = 116, + In = 117, + LT2 = 118, + Dyn = 119, + MutableSpecifier = 120, + Raw = 121, + Yield = 122, + Move = 123, + Try = 124, + IntegerLiteral = 125, + DQUOTE = 126, + DQUOTE2 = 127, + CharLiteral = 128, + EscapeSequence = 129, + True = 130, + False = 131, + SLASHSLASH = 132, + LineCommentToken1 = 133, + LineCommentToken2 = 134, + LineCommentToken3 = 135, + BANG2 = 136, + SLASH2 = 137, + SLASHSTAR = 138, + STARSLASH = 139, + Shebang = 140, + Zelf = 141, + Super = 142, + Crate = 143, + Metavariable = 144, + StringContent = 145, + RawStringLiteralStart = 146, + StringContent2 = 147, + RawStringLiteralEnd = 148, + FloatLiteral = 149, + OuterDocCommentMarker = 150, + InnerDocCommentMarker = 151, + BlockCommentContent = 152, + DocComment = 153, + ErrorSentinel = 154, + SourceFile = 155, + Statement = 156, + EmptyStatement = 157, + ExpressionStatement = 158, + MacroDefinition = 159, + MacroRule = 160, + TokenPattern = 161, + TokenTreePattern = 162, + TokenBindingPattern = 163, + TokenRepetitionPattern = 164, + FragmentSpecifier = 165, + TokenTree = 166, + TokenRepetition = 167, + AttributeItem = 168, + InnerAttributeItem = 169, + Attribute = 170, + ModItem = 171, + ForeignModItem = 172, + DeclarationList = 173, + StructItem = 174, + UnionItem = 175, + EnumItem = 176, + EnumVariantList = 177, + EnumVariant = 178, + FieldDeclarationList = 179, + FieldDeclaration = 180, + OrderedFieldDeclarationList = 181, + ExternCrateDeclaration = 182, + ConstItem = 183, + StaticItem = 184, + TypeItem = 185, + FunctionItem = 186, + FunctionSignatureItem = 187, + FunctionModifiers = 188, + WhereClause = 189, + WherePredicate = 190, + ImplItem = 191, + TraitItem = 192, + AssociatedType = 193, + TraitBounds = 194, + HigherRankedTraitBound = 195, + RemovedTraitBound = 196, + TypeParameters = 197, + ConstParameter = 198, + ConstrainedTypeParameter = 199, + OptionalTypeParameter = 200, + LetDeclaration = 201, + UseDeclaration = 202, + UseClause = 203, + ScopedUseList = 204, + UseList = 205, + UseAsClause = 206, + UseWildcard = 207, + Parameters = 208, + SelfParameter = 209, + VariadicParameter = 210, + Parameter = 211, + ExternModifier = 212, + VisibilityModifier = 213, + Type2 = 214, + BracketedType = 215, + QualifiedType = 216, + Lifetime = 217, + ArrayType = 218, + ForLifetimes = 219, + FunctionType = 220, + TupleType = 221, + UnitType = 222, + GenericFunction = 223, + GenericType = 224, + GenericTypeWithTurbofish = 225, + BoundedType = 226, + TypeArguments = 227, + TypeBinding = 228, + ReferenceType = 229, + PointerType = 230, + NeverType = 231, + AbstractType = 232, + DynamicType = 233, + ExpressionExceptRange = 234, + Expression = 235, + MacroInvocation = 236, + TokenTree2 = 237, + DelimTokens = 238, + NonDelimToken = 239, + ScopedIdentifier = 240, + ScopedTypeIdentifier = 241, + ScopedTypeIdentifier2 = 242, + RangeExpression = 243, + UnaryExpression = 244, + TryExpression = 245, + ReferenceExpression = 246, + BinaryExpression = 247, + AssignmentExpression = 248, + CompoundAssignmentExpr = 249, + TypeCastExpression = 250, + ReturnExpression = 251, + YieldExpression = 252, + CallExpression = 253, + Arguments = 254, + ArrayExpression = 255, + ParenthesizedExpression = 256, + TupleExpression = 257, + UnitExpression = 258, + StructExpression = 259, + FieldInitializerList = 260, + ShorthandFieldInitializer = 261, + FieldInitializer = 262, + BaseFieldInitializer = 263, + IfExpression = 264, + LetCondition = 265, + LetChain2 = 266, + Condition = 267, + ElseClause = 268, + MatchExpression = 269, + MatchBlock = 270, + MatchArm = 271, + MatchArm2 = 272, + MatchPattern = 273, + WhileExpression = 274, + LoopExpression = 275, + ForExpression = 276, + ConstBlock = 277, + ClosureExpression = 278, + ClosureParameters = 279, + Label = 280, + BreakExpression = 281, + ContinueExpression = 282, + IndexExpression = 283, + AwaitExpression = 284, + FieldExpression = 285, + UnsafeBlock = 286, + AsyncBlock = 287, + GenBlock = 288, + TryBlock = 289, + Block = 290, + Pattern = 291, + TuplePattern = 292, + SlicePattern = 293, + TupleStructPattern = 294, + StructPattern = 295, + FieldPattern = 296, + RemainingFieldPattern = 297, + MutPattern = 298, + RangePattern = 299, + RefPattern = 300, + CapturedPattern = 301, + ReferencePattern = 302, + OrPattern = 303, + Literal2 = 304, + LiteralPattern = 305, + NegativeLiteral = 306, + StringLiteral = 307, + RawStringLiteral = 308, + BooleanLiteral = 309, + LineComment = 310, + LineDocCommentMarker = 311, + InnerDocCommentMarker2 = 312, + OuterDocCommentMarker2 = 313, + BlockComment = 314, + BlockDocCommentMarker = 315, + SourceFileRepeat1 = 316, + MacroDefinitionRepeat1 = 317, + TokenTreePatternRepeat1 = 318, + TokenTreeRepeat1 = 319, + NonSpecialTokenRepeat1 = 320, + DeclarationListRepeat1 = 321, + EnumVariantListRepeat1 = 322, + EnumVariantListRepeat2 = 323, + FieldDeclarationListRepeat1 = 324, + OrderedFieldDeclarationListRepeat1 = 325, + FunctionModifiersRepeat1 = 326, + WhereClauseRepeat1 = 327, + TraitBoundsRepeat1 = 328, + TypeParametersRepeat1 = 329, + UseListRepeat1 = 330, + ParametersRepeat1 = 331, + ForLifetimesRepeat1 = 332, + TupleTypeRepeat1 = 333, + TypeArgumentsRepeat1 = 334, + DelimTokenTreeRepeat1 = 335, + ArgumentsRepeat1 = 336, + TupleExpressionRepeat1 = 337, + FieldInitializerListRepeat1 = 338, + MatchBlockRepeat1 = 339, + MatchArmRepeat1 = 340, + ClosureParametersRepeat1 = 341, + TuplePatternRepeat1 = 342, + SlicePatternRepeat1 = 343, + StructPatternRepeat1 = 344, + StringLiteralRepeat1 = 345, + FieldIdentifier = 346, + LetChain = 347, + ShorthandFieldIdentifier = 348, + TypeIdentifier = 349, + Error = 350, } impl From for &'static str { @@ -385,14 +380,12 @@ impl From for &'static str { Rust::QMARK => "?", Rust::Block2 => "block", Rust::Expr => "expr", - Rust::Expr2021 => "expr_2021", Rust::Ident => "ident", Rust::Item => "item", Rust::Lifetime2 => "lifetime", Rust::Literal => "literal", Rust::Meta => "meta", Rust::Pat => "pat", - Rust::PatParam => "pat_param", Rust::Path => "path", Rust::Stmt => "stmt", Rust::Tt => "tt", @@ -567,8 +560,8 @@ impl From for &'static str { Rust::RemovedTraitBound => "removed_trait_bound", Rust::TypeParameters => "type_parameters", Rust::ConstParameter => "const_parameter", - Rust::TypeParameter => "type_parameter", - Rust::LifetimeParameter => "lifetime_parameter", + Rust::ConstrainedTypeParameter => "constrained_type_parameter", + Rust::OptionalTypeParameter => "optional_type_parameter", Rust::LetDeclaration => "let_declaration", Rust::UseDeclaration => "use_declaration", Rust::UseClause => "_use_clause", @@ -595,7 +588,6 @@ impl From for &'static str { Rust::GenericType => "generic_type", Rust::GenericTypeWithTurbofish => "generic_type_with_turbofish", Rust::BoundedType => "bounded_type", - Rust::UseBounds => "use_bounds", Rust::TypeArguments => "type_arguments", Rust::TypeBinding => "type_binding", Rust::ReferenceType => "reference_type", @@ -661,7 +653,6 @@ impl From for &'static str { Rust::TryBlock => "try_block", Rust::Block => "block", Rust::Pattern => "_pattern", - Rust::GenericPattern => "generic_pattern", Rust::TuplePattern => "tuple_pattern", Rust::SlicePattern => "slice_pattern", Rust::TupleStructPattern => "tuple_struct_pattern", @@ -704,7 +695,6 @@ impl From for &'static str { Rust::ParametersRepeat1 => "parameters_repeat1", Rust::ForLifetimesRepeat1 => "for_lifetimes_repeat1", Rust::TupleTypeRepeat1 => "tuple_type_repeat1", - Rust::UseBoundsRepeat1 => "use_bounds_repeat1", Rust::TypeArgumentsRepeat1 => "type_arguments_repeat1", Rust::DelimTokenTreeRepeat1 => "delim_token_tree_repeat1", Rust::ArgumentsRepeat1 => "arguments_repeat1", diff --git a/src/node.rs b/src/node.rs index 2fa1bd9a3..49b8df104 100644 --- a/src/node.rs +++ b/src/node.rs @@ -116,7 +116,7 @@ impl<'a> Node<'a> { } pub(crate) fn child(&self, pos: usize) -> Option> { - self.0.child(pos as u32).map(Node) + self.0.child(pos).map(Node) } pub(crate) fn children(&self) -> impl ExactSizeIterator> + use<'a> { diff --git a/tree-sitter-ccomment/Cargo.toml b/tree-sitter-ccomment/Cargo.toml index 28f69823c..d9df06f4e 100644 --- a/tree-sitter-ccomment/Cargo.toml +++ b/tree-sitter-ccomment/Cargo.toml @@ -27,4 +27,4 @@ tree-sitter-language="0.1.0" cc = "^1.0" [dev-dependencies] -tree-sitter = "=0.26.3" +tree-sitter = "=0.25.3" diff --git a/tree-sitter-mozcpp/Cargo.toml b/tree-sitter-mozcpp/Cargo.toml index fcf869477..7924acb47 100644 --- a/tree-sitter-mozcpp/Cargo.toml +++ b/tree-sitter-mozcpp/Cargo.toml @@ -33,4 +33,4 @@ tree-sitter-cpp = "0.23.4" build = ["tree-sitter-cpp"] [dev-dependencies] -tree-sitter = "=0.26.3" +tree-sitter = "=0.25.3" diff --git a/tree-sitter-mozjs/Cargo.toml b/tree-sitter-mozjs/Cargo.toml index bae16b73b..b1f3915fe 100644 --- a/tree-sitter-mozjs/Cargo.toml +++ b/tree-sitter-mozjs/Cargo.toml @@ -27,10 +27,10 @@ tree-sitter-language="0.1.0" cc = "^1.0" # This dependency is not used at all for this crate, but it is here so that # dependabot can send notifications when there are updates for this grammar -tree-sitter-javascript = "0.25.0" +tree-sitter-javascript = "0.23.1" [package.metadata.cargo-udeps.ignore] build = ["tree-sitter-javascript"] [dev-dependencies] -tree-sitter = "=0.26.3" +tree-sitter = "=0.25.3" diff --git a/tree-sitter-preproc/Cargo.toml b/tree-sitter-preproc/Cargo.toml index b54d0bb5e..85a564fce 100644 --- a/tree-sitter-preproc/Cargo.toml +++ b/tree-sitter-preproc/Cargo.toml @@ -27,4 +27,4 @@ tree-sitter-language="0.1.0" cc = "^1.0" [dev-dependencies] -tree-sitter = "=0.26.3" +tree-sitter = "=0.25.3"