diff --git a/Cargo.toml b/Cargo.toml index 7a5c1bda0..a49063687 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,17 +24,17 @@ serde = { version = "^1.0", features = ["derive"] } termcolor = "^1.2" walkdir = "^2.3" -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.3" tree-sitter-java = "=0.23.5" -tree-sitter-kotlin-ng = "1.1.0" +tree-sitter-kotlin-codanna = "=0.3.9" tree-sitter-typescript = "=0.23.2" -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" } -tree-sitter-mozjs = { path = "./tree-sitter-mozjs", version = "=0.20.3" } +tree-sitter-javascript = "=0.25.0" +tree-sitter-python = "=0.25.0" +tree-sitter-rust = "=0.24.0" +tree-sitter-preproc = { path = "./tree-sitter-preproc", version = "=0.20.4" } +tree-sitter-ccomment = { path = "./tree-sitter-ccomment", version = "=0.20.4" } +tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.20.5" } +tree-sitter-mozjs = { path = "./tree-sitter-mozjs", version = "=0.20.4" } [dev-dependencies] insta = { version = "1.29.0", features = ["yaml", "json", "redactions"] } diff --git a/enums/Cargo.toml b/enums/Cargo.toml index d2dcc438e..4f5968979 100644 --- a/enums/Cargo.toml +++ b/enums/Cargo.toml @@ -8,17 +8,17 @@ edition = "2024" clap = { version = "^4.0", features = ["derive"] } askama = "^0.14" -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.3" tree-sitter-java = "=0.23.5" -tree-sitter-kotlin-ng = "1.1.0" +tree-sitter-kotlin-codanna = "=0.3.9" tree-sitter-typescript = "=0.23.2" -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" } -tree-sitter-mozjs = { path = "../tree-sitter-mozjs", version = "=0.20.3" } +tree-sitter-javascript = "=0.25.0" +tree-sitter-python = "=0.25.0" +tree-sitter-rust = "=0.24.0" +tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.20.4" } +tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.20.4" } +tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.5" } +tree-sitter-mozjs = { path = "../tree-sitter-mozjs", version = "=0.20.4" } [profile.release] strip = "debuginfo" diff --git a/enums/src/languages.rs b/enums/src/languages.rs index f7d490495..90c18fd6d 100644 --- a/enums/src/languages.rs +++ b/enums/src/languages.rs @@ -3,7 +3,7 @@ use tree_sitter::Language; mk_langs!( // 1) Name for enum // 2) tree-sitter function to call to get a Language - (Kotlin, tree_sitter_kotlin_ng), + (Kotlin, tree_sitter_kotlin_codanna), (Java, tree_sitter_java), (Rust, tree_sitter_rust), (Cpp, tree_sitter_cpp), diff --git a/enums/src/macros.rs b/enums/src/macros.rs index 3b7c79191..1626dfb03 100644 --- a/enums/src/macros.rs +++ b/enums/src/macros.rs @@ -19,7 +19,7 @@ macro_rules! mk_get_language { ( $( ($camel:ident, $name:ident) ),* ) => { pub fn get_language(lang: &Lang) -> Language { match lang { - Lang::Kotlin => tree_sitter_kotlin_ng::LANGUAGE.into(), + Lang::Kotlin => tree_sitter_kotlin_codanna::language().into(), Lang::Java => tree_sitter_java::LANGUAGE.into(), Lang::Typescript => tree_sitter_typescript::LANGUAGE_TYPESCRIPT.into(), Lang::Tsx => tree_sitter_typescript::LANGUAGE_TSX.into(), diff --git a/src/langs.rs b/src/langs.rs index 9ee9e1a8a..cbf46d527 100644 --- a/src/langs.rs +++ b/src/langs.rs @@ -53,7 +53,7 @@ mk_langs!( "kotlin", KotlinCode, KotlinParser, - tree_sitter_kotlin_ng, + tree_sitter_kotlin_codanna, [kt, kts], ["kotlin"] ), diff --git a/src/languages/language_javascript.rs b/src/languages/language_javascript.rs index 6dbb96069..ee5162278 100644 --- a/src/languages/language_javascript.rs +++ b/src/languages/language_javascript.rs @@ -20,254 +20,256 @@ pub enum Javascript { Var = 13, Let = 14, Const = 15, - 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, + 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, } impl From for &'static str { @@ -290,6 +292,9 @@ 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", @@ -297,9 +302,7 @@ 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", @@ -426,6 +429,7 @@ 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_kotlin.rs b/src/languages/language_kotlin.rs index b4eaf5670..9e01c2932 100644 --- a/src/languages/language_kotlin.rs +++ b/src/languages/language_kotlin.rs @@ -5,295 +5,366 @@ use num_derive::FromPrimitive; #[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)] pub enum Kotlin { End = 0, - Identifier = 1, - AT = 2, - File = 3, - COLON = 4, - LBRACK = 5, - RBRACK = 6, - Package = 7, - SEMI = 8, - Import2 = 9, - DOT = 10, - STAR = 11, - As = 12, - Class = 13, - Fun = 14, - Interface = 15, - Object = 16, - Val = 17, - Var = 18, - EQ = 19, - Typealias = 20, - Companion = 21, - Init = 22, - Constructor = 23, - This = 24, - Super = 25, - LT = 26, - COMMA = 27, - GT = 28, - LPAREN = 29, - RPAREN = 30, + AlphaIdentifier = 1, + HASHBANG = 2, + ShebangLineToken1 = 3, + AT = 4, + File = 5, + COLON = 6, + LBRACK = 7, + RBRACK = 8, + Package = 9, + Import = 10, + DOT = 11, + WildcardImport = 12, + As = 13, + Typealias = 14, + EQ = 15, + Class = 16, + Fun = 17, + Interface = 18, + Enum = 19, + Constructor = 20, + LBRACE = 21, + RBRACE = 22, + LPAREN = 23, + COMMA = 24, + RPAREN = 25, + Val = 26, + Var = 27, + By = 28, + LT = 29, + GT = 30, Where = 31, - By = 32, - Get = 33, - Set = 34, - LBRACE = 35, - RBRACE = 36, - For = 37, - In = 38, - While = 39, - Do = 40, - Enum = 41, - Sealed = 42, - Annotation2 = 43, - Data = 44, - Inner = 45, - Value = 46, - Tailrec = 47, - Operator = 48, - Infix = 49, - Inline = 50, - External = 51, - Suspend = 52, - Const = 53, - Public = 54, - Private = 55, - Protected = 56, - Internal = 57, - Abstract = 58, - Final = 59, - Open = 60, - Override = 61, - Lateinit = 62, - Vararg = 63, - Noinline = 64, - Crossinline = 65, - ReificationModifier = 66, - Expect = 67, - Actual = 68, - Field = 69, - Property = 70, - Receiver = 71, - Param = 72, - Setparam = 73, - Delegate = 74, - Dynamic = 75, - QMARK = 76, - AMP = 77, - DASHGT = 78, - PLUSEQ = 79, - DASHEQ = 80, - STAREQ = 81, - SLASHEQ = 82, - PERCENTEQ = 83, - PLUSPLUS = 84, - DASHDASH = 85, - PLUS = 86, - DASH = 87, + Init = 32, + Companion = 33, + Object = 34, + SEMI = 35, + Get = 36, + Set = 37, + This = 38, + Super = 39, + Dynamic = 40, + AMP = 41, + Quest = 42, + STAR = 43, + DASHGT = 44, + Label = 45, + For = 46, + In = 47, + While = 48, + Do = 49, + DOTDOT = 50, + QMARKCOLON = 51, + AMPAMP = 52, + PIPEPIPE = 53, + DOLLARLBRACE = 54, + DOLLAR = 55, + If = 56, + Else = 57, + When = 58, + Try = 59, + Catch = 60, + Finally = 61, + Throw = 62, + Return = 63, + Continue = 64, + Break = 65, + COLONCOLON = 66, + PLUSEQ = 67, + DASHEQ = 68, + STAREQ = 69, + SLASHEQ = 70, + PERCENTEQ = 71, + BANGEQ = 72, + BANGEQEQ = 73, + EQEQ = 74, + EQEQEQ = 75, + LTEQ = 76, + GTEQ = 77, + BANGin = 78, + Is = 79, + BANGis = 80, + PLUS = 81, + DASH = 82, + SLASH = 83, + PERCENT = 84, + AsQMARK = 85, + PLUSPLUS = 86, + DASHDASH = 87, BANG = 88, BANGBANG = 89, - SLASH = 90, - PERCENT = 91, - PIPEPIPE = 92, - AMPAMP = 93, - BANGEQ = 94, - BANGEQEQ = 95, - EQEQ = 96, - EQEQEQ = 97, - GTEQ = 98, - LTEQ = 99, - QMARKCOLON = 100, - BANGin = 101, - Is = 102, - AsQMARK = 103, - DOTDOT = 104, - DOTDOTLT = 105, - ThisAT = 106, - SuperAT = 107, - AT2 = 108, - If = 109, - Else = 110, - When = 111, - Try = 112, - Catch = 113, - Finally = 114, - Return = 115, - ReturnAT = 116, - Throw = 117, - COLONCOLON = 118, - DQUOTE = 119, - StringContent = 120, - StringContent2 = 121, - DOLLAR = 122, - DQUOTEDQUOTEDQUOTE = 123, - DQUOTEDQUOTEDQUOTEDQUOTE = 124, - DOLLARLBRACE = 125, - SQUOTE = 126, - CharacterLiteralToken1 = 127, - EscapeSequence = 128, - NumberLiteral = 129, - FloatLiteral = 130, - Out = 131, - Label = 132, - Shebang = 133, - LineComment = 134, - Semi = 135, - ClassMemberSemi = 136, - BlockComment = 137, - BANGis = 138, - In2 = 139, - QMARKDOT = 140, - StringContent3 = 141, - SourceFile = 142, - FileAnnotation = 143, - PackageHeader = 144, - Import = 145, - Declaration = 146, - ClassDeclaration = 147, - ObjectDeclaration = 148, - PropertyDeclaration = 149, - TypeAlias = 150, - CompanionObject = 151, - AnonymousInitializer = 152, - SecondaryConstructor = 153, - ConstructorDelegationCall = 154, - TypeParameters = 155, - TypeParameter = 156, - PrimaryConstructor = 157, - ClassParameters = 158, - ClassParameter = 159, - TypeConstraints = 160, - TypeConstraint = 161, - ConstructorInvocation = 162, - FunctionDeclaration = 163, - FunctionValueParameters = 164, - Parameter = 165, - DelegationSpecifiers = 166, - DelegationSpecifier = 167, - VariableDeclaration = 168, - MultiVariableDeclaration = 169, - PropertyDelegate = 170, + Suspend = 90, + Sealed = 91, + Annotation2 = 92, + Data = 93, + Inner = 94, + Value = 95, + Override = 96, + Lateinit = 97, + Public = 98, + Private = 99, + Internal = 100, + Protected = 101, + Out = 102, + Tailrec = 103, + Operator = 104, + Infix = 105, + Inline = 106, + External = 107, + PropertyModifier = 108, + Abstract = 109, + Final = 110, + Open = 111, + Vararg = 112, + Noinline = 113, + Crossinline = 114, + ReificationModifier = 115, + Expect = 116, + Actual = 117, + Field = 118, + Property = 119, + Receiver = 120, + Param = 121, + Setparam = 122, + Delegate = 123, + LineComment = 124, + ReturnAT = 125, + ContinueAT = 126, + BreakAT = 127, + ThisAT = 128, + SuperAT = 129, + AT2 = 130, + RealLiteral = 131, + IntegerLiteral = 132, + HexLiteral = 133, + BinLiteral = 134, + UnsignedLiteralToken1 = 135, + L = 136, + True = 137, + False = 138, + SQUOTE = 139, + CharacterLiteralToken1 = 140, + NullLiteral = 141, + BacktickIdentifier = 142, + BSLASHu = 143, + UniCharacterLiteralToken1 = 144, + EscapedIdentifier = 145, + AutomaticSemicolon = 146, + ImportListDelimiter = 147, + QMARKDOT = 148, + MultilineComment = 149, + StringStart = 150, + StringEnd = 151, + StringContent = 152, + SourceFile = 153, + ShebangLine = 154, + FileAnnotation = 155, + PackageHeader = 156, + ImportList = 157, + ImportHeader = 158, + ImportAlias = 159, + TypeAlias = 160, + Declaration = 161, + ClassDeclaration = 162, + PrimaryConstructor = 163, + ClassBody = 164, + ClassParameters = 165, + BindingPatternKind = 166, + ClassParameter = 167, + DelegationSpecifiers = 168, + DelegationSpecifier = 169, + ConstructorInvocation = 170, ExplicitDelegation = 171, - Getter = 172, - Setter = 173, - FunctionBody = 174, - Block = 175, - ForStatement = 176, - WhileStatement = 177, - DoWhileStatement = 178, - ClassBody = 179, - ClassMemberDeclaration = 180, - EnumClassBody = 181, - EnumEntry = 182, - ValueArguments = 183, - ValueArgument = 184, - Statement = 185, - Modifiers = 186, - ClassModifier = 187, - FunctionModifier = 188, - PropertyModifier = 189, - VisibilityModifier = 190, - InheritanceModifier = 191, - MemberModifier = 192, - ParameterModifiers = 193, - ParameterModifier = 194, - PlatformModifier = 195, - TypeModifiers = 196, - Annotation = 197, - UseSiteTarget = 198, - UnescapedAnnotation = 199, - Type = 200, - UserType = 201, - SimpleUserType = 202, - NullableType = 203, - NonNullableType = 204, - ReceiverType = 205, - TypeArguments = 206, - TypeProjection = 207, - FunctionType = 208, - FunctionTypeParameters = 209, - ParenthesizedType = 210, - Assignment = 211, - Expression = 212, - PrimaryExpression = 213, - UnaryExpression = 214, - AnnotatedExpression = 215, - LabeledExpression = 216, - BinaryExpression = 217, - InExpression = 218, - IsExpression = 219, - AsExpression = 220, - SpreadExpression = 221, - RangeExpression = 222, - InfixExpression = 223, + TypeParameters = 172, + TypeParameter = 173, + TypeConstraints = 174, + TypeConstraint = 175, + ClassMemberDeclarations = 176, + ClassMemberDeclaration = 177, + AnonymousInitializer = 178, + CompanionObject = 179, + FunctionValueParameters = 180, + FunctionValueParameter = 181, + ReceiverType = 182, + FunctionDeclaration = 183, + FunctionBody = 184, + VariableDeclaration = 185, + PropertyDeclaration = 186, + PropertyDelegate = 187, + Getter = 188, + Setter = 189, + ParameterWithOptionalType = 190, + Parameter = 191, + ObjectDeclaration = 192, + SecondaryConstructor = 193, + ConstructorDelegationCall = 194, + EnumClassBody = 195, + EnumEntries = 196, + EnumEntry = 197, + Type = 198, + TypeReference = 199, + NotNullableType = 200, + NullableType = 201, + UserType = 202, + SimpleUserType = 203, + TypeProjection = 204, + TypeProjectionModifiers = 205, + TypeProjectionModifier = 206, + FunctionType = 207, + FunctionTypeParameters = 208, + ParenthesizedType = 209, + ParenthesizedUserType = 210, + Statements = 211, + Statement = 212, + ControlStructureBody = 213, + Block = 214, + LoopStatement = 215, + ForStatement = 216, + WhileStatement = 217, + DoWhileStatement = 218, + Semi = 219, + Assignment = 220, + Expression = 221, + UnaryExpression = 222, + PostfixExpression = 223, CallExpression = 224, - AnnotatedLambda = 225, - LambdaLiteral = 226, - LambdaParameters = 227, - LambdaParameter = 228, - AnonymousFunction = 229, - IndexExpression = 230, - ThisExpression = 231, - SuperExpression = 232, - IfExpression = 233, - ParenthesizedExpression = 234, - CollectionLiteral = 235, - WhenExpression = 236, - WhenSubject = 237, - WhenEntry = 238, - WhenCondition = 239, - RangeTest = 240, - TypeTest = 241, - TryExpression = 242, - CatchBlock = 243, - FinallyBlock = 244, - ReturnExpression = 245, - ThrowExpression = 246, - CallableReference = 247, - NavigationExpression = 248, - ObjectLiteral = 249, - StringLiteral = 250, - MultilineStringLiteral = 251, - Interpolation = 252, - CharacterLiteral = 253, - VarianceModifier = 254, - TypeParameterModifiers = 255, - QualifiedIdentifier = 256, - ReservedIdentifier = 257, - SourceFileRepeat1 = 258, - SourceFileRepeat2 = 259, - SourceFileRepeat3 = 260, - FileAnnotationRepeat1 = 261, - TypeParametersRepeat1 = 262, - ClassParametersRepeat1 = 263, - TypeConstraintsRepeat1 = 264, - FunctionValueParametersRepeat1 = 265, - DelegationSpecifiersRepeat1 = 266, - DelegationSpecifierRepeat1 = 267, - MultiVariableDeclarationRepeat1 = 268, - ClassBodyRepeat1 = 269, - EnumClassBodyRepeat1 = 270, - ValueArgumentsRepeat1 = 271, - StatementsRepeat1 = 272, - ModifiersRepeat1 = 273, - ParameterModifiersRepeat1 = 274, - TypeModifiersRepeat1 = 275, - UserTypeRepeat1 = 276, - TypeArgumentsRepeat1 = 277, - TypeProjectionRepeat1 = 278, - FunctionTypeParametersRepeat1 = 279, - LambdaParametersRepeat1 = 280, - IndexExpressionRepeat1 = 281, - WhenExpressionRepeat1 = 282, - WhenEntryRepeat1 = 283, - TryExpressionRepeat1 = 284, - StringLiteralRepeat1 = 285, - MultilineStringLiteralRepeat1 = 286, - TypeParameterModifiersRepeat1 = 287, - QualifiedIdentifierRepeat1 = 288, - Error = 289, + IndexingExpression = 225, + NavigationExpression = 226, + PrefixExpression = 227, + AsExpression = 228, + SpreadExpression = 229, + BinaryExpression = 230, + MultiplicativeExpression = 231, + AdditiveExpression = 232, + RangeExpression = 233, + InfixExpression = 234, + ElvisExpression = 235, + CheckExpression = 236, + ComparisonExpression = 237, + EqualityExpression = 238, + ConjunctionExpression = 239, + DisjunctionExpression = 240, + IndexingSuffix = 241, + NavigationSuffix = 242, + CallSuffix = 243, + AnnotatedLambda = 244, + TypeArguments = 245, + ValueArguments = 246, + ValueArgument = 247, + PrimaryExpression = 248, + ParenthesizedExpression = 249, + CollectionLiteral = 250, + LiteralConstant = 251, + StringLiteral = 252, + Interpolation = 253, + LambdaLiteral = 254, + MultiVariableDeclaration = 255, + LambdaParameters = 256, + LambdaParameter = 257, + AnonymousFunction = 258, + FunctionLiteral = 259, + ObjectLiteral = 260, + ThisExpression = 261, + SuperExpression = 262, + IfExpression = 263, + WhenSubject = 264, + WhenExpression = 265, + WhenEntry = 266, + WhenCondition = 267, + RangeTest = 268, + TypeTest = 269, + TryExpression = 270, + CatchBlock = 271, + FinallyBlock = 272, + JumpExpression = 273, + CallableReference = 274, + AssignmentAndOperator = 275, + EqualityOperator = 276, + ComparisonOperator = 277, + InOperator = 278, + IsOperator = 279, + AdditiveOperator = 280, + MultiplicativeOperator = 281, + AsOperator = 282, + PrefixUnaryOperator = 283, + PostfixUnaryOperator = 284, + MemberAccessOperator = 285, + PostfixUnarySuffix = 286, + PostfixUnaryExpression = 287, + DirectlyAssignableExpression = 288, + Modifiers = 289, + ParameterModifiers = 290, + Modifier = 291, + TypeModifiers = 292, + TypeModifier = 293, + ClassModifier = 294, + MemberModifier = 295, + VisibilityModifier = 296, + VarianceModifier = 297, + TypeParameterModifiers = 298, + TypeParameterModifier = 299, + FunctionModifier = 300, + InheritanceModifier = 301, + ParameterModifier = 302, + PlatformModifier = 303, + Annotation = 304, + SingleAnnotation = 305, + MultiAnnotation = 306, + UseSiteTarget = 307, + UnescapedAnnotation = 308, + SimpleIdentifier = 309, + Identifier = 310, + ImportIdentifier = 311, + ReturnAt = 312, + ContinueAt = 313, + BreakAt = 314, + ThisAt = 315, + SuperAt = 316, + UnsignedLiteral = 317, + LongLiteral = 318, + BooleanLiteral = 319, + CharacterLiteral = 320, + CharacterEscapeSeq = 321, + LexicalIdentifier = 322, + UniCharacterLiteral = 323, + SourceFileRepeat1 = 324, + SourceFileRepeat2 = 325, + SourceFileRepeat3 = 326, + FileAnnotationRepeat1 = 327, + ImportListRepeat1 = 328, + ClassParametersRepeat1 = 329, + DelegationSpecifiersRepeat1 = 330, + AnnotatedDelegationSpecifierRepeat1 = 331, + TypeParametersRepeat1 = 332, + TypeConstraintsRepeat1 = 333, + FunctionValueParametersRepeat1 = 334, + EnumEntriesRepeat1 = 335, + NullableTypeRepeat1 = 336, + UserTypeRepeat1 = 337, + TypeProjectionModifiersRepeat1 = 338, + FunctionTypeParametersRepeat1 = 339, + StatementsRepeat1 = 340, + StatementRepeat1 = 341, + IndexingSuffixRepeat1 = 342, + TypeArgumentsRepeat1 = 343, + ValueArgumentsRepeat1 = 344, + StringLiteralRepeat1 = 345, + MultiVariableDeclarationRepeat1 = 346, + LambdaParametersRepeat1 = 347, + WhenExpressionRepeat1 = 348, + WhenEntryRepeat1 = 349, + TryExpressionRepeat1 = 350, + PostfixUnaryExpressionRepeat1 = 351, + ModifiersRepeat1 = 352, + ParameterModifiersRepeat1 = 353, + TypeModifiersRepeat1 = 354, + TypeParameterModifiersRepeat1 = 355, + IdentifierRepeat1 = 356, + InterpolatedExpression = 357, + InterpolatedIdentifier = 358, + TypeIdentifier = 359, + Error = 360, } impl From for &'static str { @@ -301,68 +372,117 @@ impl From for &'static str { fn from(tok: Kotlin) -> Self { match tok { Kotlin::End => "end", - Kotlin::Identifier => "identifier", + Kotlin::AlphaIdentifier => "_alpha_identifier", + Kotlin::HASHBANG => "#!", + Kotlin::ShebangLineToken1 => "shebang_line_token1", Kotlin::AT => "@", Kotlin::File => "file", Kotlin::COLON => ":", Kotlin::LBRACK => "[", Kotlin::RBRACK => "]", Kotlin::Package => "package", - Kotlin::SEMI => ";", - Kotlin::Import2 => "import", + Kotlin::Import => "import", Kotlin::DOT => ".", - Kotlin::STAR => "*", + Kotlin::WildcardImport => "wildcard_import", Kotlin::As => "as", + Kotlin::Typealias => "typealias", + Kotlin::EQ => "=", Kotlin::Class => "class", Kotlin::Fun => "fun", Kotlin::Interface => "interface", - Kotlin::Object => "object", + Kotlin::Enum => "enum", + Kotlin::Constructor => "constructor", + Kotlin::LBRACE => "{", + Kotlin::RBRACE => "}", + Kotlin::LPAREN => "(", + Kotlin::COMMA => ",", + Kotlin::RPAREN => ")", Kotlin::Val => "val", Kotlin::Var => "var", - Kotlin::EQ => "=", - Kotlin::Typealias => "typealias", - Kotlin::Companion => "companion", - Kotlin::Init => "init", - Kotlin::Constructor => "constructor", - Kotlin::This => "this", - Kotlin::Super => "super", + Kotlin::By => "by", Kotlin::LT => "<", - Kotlin::COMMA => ",", Kotlin::GT => ">", - Kotlin::LPAREN => "(", - Kotlin::RPAREN => ")", Kotlin::Where => "where", - Kotlin::By => "by", + Kotlin::Init => "init", + Kotlin::Companion => "companion", + Kotlin::Object => "object", + Kotlin::SEMI => ";", Kotlin::Get => "get", Kotlin::Set => "set", - Kotlin::LBRACE => "{", - Kotlin::RBRACE => "}", + Kotlin::This => "this", + Kotlin::Super => "super", + Kotlin::Dynamic => "dynamic", + Kotlin::AMP => "&", + Kotlin::Quest => "_quest", + Kotlin::STAR => "*", + Kotlin::DASHGT => "->", + Kotlin::Label => "label", Kotlin::For => "for", Kotlin::In => "in", Kotlin::While => "while", Kotlin::Do => "do", - Kotlin::Enum => "enum", + Kotlin::DOTDOT => "..", + Kotlin::QMARKCOLON => "?:", + Kotlin::AMPAMP => "&&", + Kotlin::PIPEPIPE => "||", + Kotlin::DOLLARLBRACE => "${", + Kotlin::DOLLAR => "$", + Kotlin::If => "if", + Kotlin::Else => "else", + Kotlin::When => "when", + Kotlin::Try => "try", + Kotlin::Catch => "catch", + Kotlin::Finally => "finally", + Kotlin::Throw => "throw", + Kotlin::Return => "return", + Kotlin::Continue => "continue", + Kotlin::Break => "break", + Kotlin::COLONCOLON => "::", + Kotlin::PLUSEQ => "+=", + Kotlin::DASHEQ => "-=", + Kotlin::STAREQ => "*=", + Kotlin::SLASHEQ => "/=", + Kotlin::PERCENTEQ => "%=", + Kotlin::BANGEQ => "!=", + Kotlin::BANGEQEQ => "!==", + Kotlin::EQEQ => "==", + Kotlin::EQEQEQ => "===", + Kotlin::LTEQ => "<=", + Kotlin::GTEQ => ">=", + Kotlin::BANGin => "!in", + Kotlin::Is => "is", + Kotlin::BANGis => "!is", + Kotlin::PLUS => "+", + Kotlin::DASH => "-", + Kotlin::SLASH => "/", + Kotlin::PERCENT => "%", + Kotlin::AsQMARK => "as?", + Kotlin::PLUSPLUS => "++", + Kotlin::DASHDASH => "--", + Kotlin::BANG => "!", + Kotlin::BANGBANG => "!!", + Kotlin::Suspend => "suspend", Kotlin::Sealed => "sealed", Kotlin::Annotation2 => "annotation", Kotlin::Data => "data", Kotlin::Inner => "inner", Kotlin::Value => "value", + Kotlin::Override => "override", + Kotlin::Lateinit => "lateinit", + Kotlin::Public => "public", + Kotlin::Private => "private", + Kotlin::Internal => "internal", + Kotlin::Protected => "protected", + Kotlin::Out => "out", Kotlin::Tailrec => "tailrec", Kotlin::Operator => "operator", Kotlin::Infix => "infix", Kotlin::Inline => "inline", Kotlin::External => "external", - Kotlin::Suspend => "suspend", - Kotlin::Const => "const", - Kotlin::Public => "public", - Kotlin::Private => "private", - Kotlin::Protected => "protected", - Kotlin::Internal => "internal", + Kotlin::PropertyModifier => "property_modifier", Kotlin::Abstract => "abstract", Kotlin::Final => "final", Kotlin::Open => "open", - Kotlin::Override => "override", - Kotlin::Lateinit => "lateinit", Kotlin::Vararg => "vararg", Kotlin::Noinline => "noinline", Kotlin::Crossinline => "crossinline", @@ -375,220 +495,244 @@ impl From for &'static str { Kotlin::Param => "param", Kotlin::Setparam => "setparam", Kotlin::Delegate => "delegate", - Kotlin::Dynamic => "dynamic", - Kotlin::QMARK => "?", - Kotlin::AMP => "&", - Kotlin::DASHGT => "->", - Kotlin::PLUSEQ => "+=", - Kotlin::DASHEQ => "-=", - Kotlin::STAREQ => "*=", - Kotlin::SLASHEQ => "/=", - Kotlin::PERCENTEQ => "%=", - Kotlin::PLUSPLUS => "++", - Kotlin::DASHDASH => "--", - Kotlin::PLUS => "+", - Kotlin::DASH => "-", - Kotlin::BANG => "!", - Kotlin::BANGBANG => "!!", - Kotlin::SLASH => "/", - Kotlin::PERCENT => "%", - Kotlin::PIPEPIPE => "||", - Kotlin::AMPAMP => "&&", - Kotlin::BANGEQ => "!=", - Kotlin::BANGEQEQ => "!==", - Kotlin::EQEQ => "==", - Kotlin::EQEQEQ => "===", - Kotlin::GTEQ => ">=", - Kotlin::LTEQ => "<=", - Kotlin::QMARKCOLON => "?:", - Kotlin::BANGin => "!in", - Kotlin::Is => "is", - Kotlin::AsQMARK => "as?", - Kotlin::DOTDOT => "..", - Kotlin::DOTDOTLT => "..<", + Kotlin::LineComment => "line_comment", + Kotlin::ReturnAT => "return@", + Kotlin::ContinueAT => "continue@", + Kotlin::BreakAT => "break@", Kotlin::ThisAT => "this@", Kotlin::SuperAT => "super@", Kotlin::AT2 => "@", - Kotlin::If => "if", - Kotlin::Else => "else", - Kotlin::When => "when", - Kotlin::Try => "try", - Kotlin::Catch => "catch", - Kotlin::Finally => "finally", - Kotlin::Return => "return", - Kotlin::ReturnAT => "return@", - Kotlin::Throw => "throw", - Kotlin::COLONCOLON => "::", - Kotlin::DQUOTE => "\"", - Kotlin::StringContent => "string_content", - Kotlin::StringContent2 => "string_content", - Kotlin::DOLLAR => "$", - Kotlin::DQUOTEDQUOTEDQUOTE => "\"\"\"", - Kotlin::DQUOTEDQUOTEDQUOTEDQUOTE => "\"\"\"\"", - Kotlin::DOLLARLBRACE => "${", + Kotlin::RealLiteral => "real_literal", + Kotlin::IntegerLiteral => "integer_literal", + Kotlin::HexLiteral => "hex_literal", + Kotlin::BinLiteral => "bin_literal", + Kotlin::UnsignedLiteralToken1 => "unsigned_literal_token1", + Kotlin::L => "L", + Kotlin::True => "true", + Kotlin::False => "false", Kotlin::SQUOTE => "'", Kotlin::CharacterLiteralToken1 => "character_literal_token1", - Kotlin::EscapeSequence => "escape_sequence", - Kotlin::NumberLiteral => "number_literal", - Kotlin::FloatLiteral => "float_literal", - Kotlin::Out => "out", - Kotlin::Label => "label", - Kotlin::Shebang => "shebang", - Kotlin::LineComment => "line_comment", - Kotlin::Semi => "_semi", - Kotlin::ClassMemberSemi => "_class_member_semi", - Kotlin::BlockComment => "block_comment", - Kotlin::BANGis => "!is", - Kotlin::In2 => "in", + Kotlin::NullLiteral => "null_literal", + Kotlin::BacktickIdentifier => "_backtick_identifier", + Kotlin::BSLASHu => "\\u", + Kotlin::UniCharacterLiteralToken1 => "_uni_character_literal_token1", + Kotlin::EscapedIdentifier => "_escaped_identifier", + Kotlin::AutomaticSemicolon => "_automatic_semicolon", + Kotlin::ImportListDelimiter => "_import_list_delimiter", Kotlin::QMARKDOT => "?.", - Kotlin::StringContent3 => "string_content", + Kotlin::MultilineComment => "multiline_comment", + Kotlin::StringStart => "_string_start", + Kotlin::StringEnd => "_string_end", + Kotlin::StringContent => "string_content", Kotlin::SourceFile => "source_file", + Kotlin::ShebangLine => "shebang_line", Kotlin::FileAnnotation => "file_annotation", Kotlin::PackageHeader => "package_header", - Kotlin::Import => "import", - Kotlin::Declaration => "declaration", - Kotlin::ClassDeclaration => "class_declaration", - Kotlin::ObjectDeclaration => "object_declaration", - Kotlin::PropertyDeclaration => "property_declaration", + Kotlin::ImportList => "import_list", + Kotlin::ImportHeader => "import_header", + Kotlin::ImportAlias => "import_alias", Kotlin::TypeAlias => "type_alias", - Kotlin::CompanionObject => "companion_object", - Kotlin::AnonymousInitializer => "anonymous_initializer", - Kotlin::SecondaryConstructor => "secondary_constructor", - Kotlin::ConstructorDelegationCall => "constructor_delegation_call", - Kotlin::TypeParameters => "type_parameters", - Kotlin::TypeParameter => "type_parameter", + Kotlin::Declaration => "_declaration", + Kotlin::ClassDeclaration => "class_declaration", Kotlin::PrimaryConstructor => "primary_constructor", - Kotlin::ClassParameters => "class_parameters", + Kotlin::ClassBody => "class_body", + Kotlin::ClassParameters => "_class_parameters", + Kotlin::BindingPatternKind => "binding_pattern_kind", Kotlin::ClassParameter => "class_parameter", + Kotlin::DelegationSpecifiers => "_delegation_specifiers", + Kotlin::DelegationSpecifier => "delegation_specifier", + Kotlin::ConstructorInvocation => "constructor_invocation", + Kotlin::ExplicitDelegation => "explicit_delegation", + Kotlin::TypeParameters => "type_parameters", + Kotlin::TypeParameter => "type_parameter", Kotlin::TypeConstraints => "type_constraints", Kotlin::TypeConstraint => "type_constraint", - Kotlin::ConstructorInvocation => "constructor_invocation", - Kotlin::FunctionDeclaration => "function_declaration", + Kotlin::ClassMemberDeclarations => "_class_member_declarations", + Kotlin::ClassMemberDeclaration => "_class_member_declaration", + Kotlin::AnonymousInitializer => "anonymous_initializer", + Kotlin::CompanionObject => "companion_object", Kotlin::FunctionValueParameters => "function_value_parameters", - Kotlin::Parameter => "parameter", - Kotlin::DelegationSpecifiers => "delegation_specifiers", - Kotlin::DelegationSpecifier => "delegation_specifier", + Kotlin::FunctionValueParameter => "_function_value_parameter", + Kotlin::ReceiverType => "receiver_type", + Kotlin::FunctionDeclaration => "function_declaration", + Kotlin::FunctionBody => "function_body", Kotlin::VariableDeclaration => "variable_declaration", - Kotlin::MultiVariableDeclaration => "multi_variable_declaration", + Kotlin::PropertyDeclaration => "property_declaration", Kotlin::PropertyDelegate => "property_delegate", - Kotlin::ExplicitDelegation => "explicit_delegation", Kotlin::Getter => "getter", Kotlin::Setter => "setter", - Kotlin::FunctionBody => "function_body", - Kotlin::Block => "block", - Kotlin::ForStatement => "for_statement", - Kotlin::WhileStatement => "while_statement", - Kotlin::DoWhileStatement => "do_while_statement", - Kotlin::ClassBody => "class_body", - Kotlin::ClassMemberDeclaration => "class_member_declaration", + Kotlin::ParameterWithOptionalType => "parameter_with_optional_type", + Kotlin::Parameter => "parameter", + Kotlin::ObjectDeclaration => "object_declaration", + Kotlin::SecondaryConstructor => "secondary_constructor", + Kotlin::ConstructorDelegationCall => "constructor_delegation_call", Kotlin::EnumClassBody => "enum_class_body", + Kotlin::EnumEntries => "_enum_entries", Kotlin::EnumEntry => "enum_entry", - Kotlin::ValueArguments => "value_arguments", - Kotlin::ValueArgument => "value_argument", - Kotlin::Statement => "statement", - Kotlin::Modifiers => "modifiers", - Kotlin::ClassModifier => "class_modifier", - Kotlin::FunctionModifier => "function_modifier", - Kotlin::PropertyModifier => "property_modifier", - Kotlin::VisibilityModifier => "visibility_modifier", - Kotlin::InheritanceModifier => "inheritance_modifier", - Kotlin::MemberModifier => "member_modifier", - Kotlin::ParameterModifiers => "parameter_modifiers", - Kotlin::ParameterModifier => "parameter_modifier", - Kotlin::PlatformModifier => "platform_modifier", - Kotlin::TypeModifiers => "type_modifiers", - Kotlin::Annotation => "annotation", - Kotlin::UseSiteTarget => "use_site_target", - Kotlin::UnescapedAnnotation => "_unescaped_annotation", - Kotlin::Type => "type", + Kotlin::Type => "_type", + Kotlin::TypeReference => "_type_reference", + Kotlin::NotNullableType => "not_nullable_type", + Kotlin::NullableType => "nullable_type", Kotlin::UserType => "user_type", Kotlin::SimpleUserType => "_simple_user_type", - Kotlin::NullableType => "nullable_type", - Kotlin::NonNullableType => "non_nullable_type", - Kotlin::ReceiverType => "_receiver_type", - Kotlin::TypeArguments => "type_arguments", Kotlin::TypeProjection => "type_projection", + Kotlin::TypeProjectionModifiers => "type_projection_modifiers", + Kotlin::TypeProjectionModifier => "_type_projection_modifier", Kotlin::FunctionType => "function_type", Kotlin::FunctionTypeParameters => "function_type_parameters", Kotlin::ParenthesizedType => "parenthesized_type", + Kotlin::ParenthesizedUserType => "parenthesized_user_type", + Kotlin::Statements => "statements", + Kotlin::Statement => "_statement", + Kotlin::ControlStructureBody => "control_structure_body", + Kotlin::Block => "_block", + Kotlin::LoopStatement => "_loop_statement", + Kotlin::ForStatement => "for_statement", + Kotlin::WhileStatement => "while_statement", + Kotlin::DoWhileStatement => "do_while_statement", + Kotlin::Semi => "_semi", Kotlin::Assignment => "assignment", - Kotlin::Expression => "expression", - Kotlin::PrimaryExpression => "primary_expression", - Kotlin::UnaryExpression => "unary_expression", - Kotlin::AnnotatedExpression => "annotated_expression", - Kotlin::LabeledExpression => "labeled_expression", - Kotlin::BinaryExpression => "binary_expression", - Kotlin::InExpression => "in_expression", - Kotlin::IsExpression => "is_expression", + Kotlin::Expression => "_expression", + Kotlin::UnaryExpression => "_unary_expression", + Kotlin::PostfixExpression => "postfix_expression", + Kotlin::CallExpression => "call_expression", + Kotlin::IndexingExpression => "indexing_expression", + Kotlin::NavigationExpression => "navigation_expression", + Kotlin::PrefixExpression => "prefix_expression", Kotlin::AsExpression => "as_expression", Kotlin::SpreadExpression => "spread_expression", + Kotlin::BinaryExpression => "_binary_expression", + Kotlin::MultiplicativeExpression => "multiplicative_expression", + Kotlin::AdditiveExpression => "additive_expression", Kotlin::RangeExpression => "range_expression", Kotlin::InfixExpression => "infix_expression", - Kotlin::CallExpression => "call_expression", + Kotlin::ElvisExpression => "elvis_expression", + Kotlin::CheckExpression => "check_expression", + Kotlin::ComparisonExpression => "comparison_expression", + Kotlin::EqualityExpression => "equality_expression", + Kotlin::ConjunctionExpression => "conjunction_expression", + Kotlin::DisjunctionExpression => "disjunction_expression", + Kotlin::IndexingSuffix => "indexing_suffix", + Kotlin::NavigationSuffix => "navigation_suffix", + Kotlin::CallSuffix => "call_suffix", Kotlin::AnnotatedLambda => "annotated_lambda", + Kotlin::TypeArguments => "type_arguments", + Kotlin::ValueArguments => "value_arguments", + Kotlin::ValueArgument => "value_argument", + Kotlin::PrimaryExpression => "_primary_expression", + Kotlin::ParenthesizedExpression => "parenthesized_expression", + Kotlin::CollectionLiteral => "collection_literal", + Kotlin::LiteralConstant => "_literal_constant", + Kotlin::StringLiteral => "string_literal", + Kotlin::Interpolation => "_interpolation", Kotlin::LambdaLiteral => "lambda_literal", + Kotlin::MultiVariableDeclaration => "multi_variable_declaration", Kotlin::LambdaParameters => "lambda_parameters", Kotlin::LambdaParameter => "_lambda_parameter", Kotlin::AnonymousFunction => "anonymous_function", - Kotlin::IndexExpression => "index_expression", + Kotlin::FunctionLiteral => "_function_literal", + Kotlin::ObjectLiteral => "object_literal", Kotlin::ThisExpression => "this_expression", Kotlin::SuperExpression => "super_expression", Kotlin::IfExpression => "if_expression", - Kotlin::ParenthesizedExpression => "parenthesized_expression", - Kotlin::CollectionLiteral => "collection_literal", - Kotlin::WhenExpression => "when_expression", Kotlin::WhenSubject => "when_subject", + Kotlin::WhenExpression => "when_expression", Kotlin::WhenEntry => "when_entry", - Kotlin::WhenCondition => "_when_condition", + Kotlin::WhenCondition => "when_condition", Kotlin::RangeTest => "range_test", Kotlin::TypeTest => "type_test", Kotlin::TryExpression => "try_expression", Kotlin::CatchBlock => "catch_block", Kotlin::FinallyBlock => "finally_block", - Kotlin::ReturnExpression => "return_expression", - Kotlin::ThrowExpression => "throw_expression", + Kotlin::JumpExpression => "jump_expression", Kotlin::CallableReference => "callable_reference", - Kotlin::NavigationExpression => "navigation_expression", - Kotlin::ObjectLiteral => "object_literal", - Kotlin::StringLiteral => "string_literal", - Kotlin::MultilineStringLiteral => "multiline_string_literal", - Kotlin::Interpolation => "interpolation", - Kotlin::CharacterLiteral => "character_literal", + Kotlin::AssignmentAndOperator => "_assignment_and_operator", + Kotlin::EqualityOperator => "_equality_operator", + Kotlin::ComparisonOperator => "_comparison_operator", + Kotlin::InOperator => "_in_operator", + Kotlin::IsOperator => "_is_operator", + Kotlin::AdditiveOperator => "_additive_operator", + Kotlin::MultiplicativeOperator => "_multiplicative_operator", + Kotlin::AsOperator => "_as_operator", + Kotlin::PrefixUnaryOperator => "_prefix_unary_operator", + Kotlin::PostfixUnaryOperator => "_postfix_unary_operator", + Kotlin::MemberAccessOperator => "_member_access_operator", + Kotlin::PostfixUnarySuffix => "_postfix_unary_suffix", + Kotlin::PostfixUnaryExpression => "_postfix_unary_expression", + Kotlin::DirectlyAssignableExpression => "directly_assignable_expression", + Kotlin::Modifiers => "modifiers", + Kotlin::ParameterModifiers => "parameter_modifiers", + Kotlin::Modifier => "_modifier", + Kotlin::TypeModifiers => "type_modifiers", + Kotlin::TypeModifier => "_type_modifier", + Kotlin::ClassModifier => "class_modifier", + Kotlin::MemberModifier => "member_modifier", + Kotlin::VisibilityModifier => "visibility_modifier", Kotlin::VarianceModifier => "variance_modifier", Kotlin::TypeParameterModifiers => "type_parameter_modifiers", - Kotlin::QualifiedIdentifier => "qualified_identifier", - Kotlin::ReservedIdentifier => "_reserved_identifier", + Kotlin::TypeParameterModifier => "_type_parameter_modifier", + Kotlin::FunctionModifier => "function_modifier", + Kotlin::InheritanceModifier => "inheritance_modifier", + Kotlin::ParameterModifier => "parameter_modifier", + Kotlin::PlatformModifier => "platform_modifier", + Kotlin::Annotation => "annotation", + Kotlin::SingleAnnotation => "_single_annotation", + Kotlin::MultiAnnotation => "_multi_annotation", + Kotlin::UseSiteTarget => "use_site_target", + Kotlin::UnescapedAnnotation => "_unescaped_annotation", + Kotlin::SimpleIdentifier => "simple_identifier", + Kotlin::Identifier => "identifier", + Kotlin::ImportIdentifier => "_import_identifier", + Kotlin::ReturnAt => "_return_at", + Kotlin::ContinueAt => "_continue_at", + Kotlin::BreakAt => "_break_at", + Kotlin::ThisAt => "_this_at", + Kotlin::SuperAt => "_super_at", + Kotlin::UnsignedLiteral => "unsigned_literal", + Kotlin::LongLiteral => "long_literal", + Kotlin::BooleanLiteral => "boolean_literal", + Kotlin::CharacterLiteral => "character_literal", + Kotlin::CharacterEscapeSeq => "character_escape_seq", + Kotlin::LexicalIdentifier => "_lexical_identifier", + Kotlin::UniCharacterLiteral => "_uni_character_literal", Kotlin::SourceFileRepeat1 => "source_file_repeat1", Kotlin::SourceFileRepeat2 => "source_file_repeat2", Kotlin::SourceFileRepeat3 => "source_file_repeat3", Kotlin::FileAnnotationRepeat1 => "file_annotation_repeat1", + Kotlin::ImportListRepeat1 => "import_list_repeat1", + Kotlin::ClassParametersRepeat1 => "_class_parameters_repeat1", + Kotlin::DelegationSpecifiersRepeat1 => "_delegation_specifiers_repeat1", + Kotlin::AnnotatedDelegationSpecifierRepeat1 => { + "_annotated_delegation_specifier_repeat1" + } Kotlin::TypeParametersRepeat1 => "type_parameters_repeat1", - Kotlin::ClassParametersRepeat1 => "class_parameters_repeat1", Kotlin::TypeConstraintsRepeat1 => "type_constraints_repeat1", Kotlin::FunctionValueParametersRepeat1 => "function_value_parameters_repeat1", - Kotlin::DelegationSpecifiersRepeat1 => "delegation_specifiers_repeat1", - Kotlin::DelegationSpecifierRepeat1 => "delegation_specifier_repeat1", - Kotlin::MultiVariableDeclarationRepeat1 => "multi_variable_declaration_repeat1", - Kotlin::ClassBodyRepeat1 => "class_body_repeat1", - Kotlin::EnumClassBodyRepeat1 => "enum_class_body_repeat1", - Kotlin::ValueArgumentsRepeat1 => "value_arguments_repeat1", - Kotlin::StatementsRepeat1 => "_statements_repeat1", - Kotlin::ModifiersRepeat1 => "modifiers_repeat1", - Kotlin::ParameterModifiersRepeat1 => "parameter_modifiers_repeat1", - Kotlin::TypeModifiersRepeat1 => "type_modifiers_repeat1", + Kotlin::EnumEntriesRepeat1 => "_enum_entries_repeat1", + Kotlin::NullableTypeRepeat1 => "nullable_type_repeat1", Kotlin::UserTypeRepeat1 => "user_type_repeat1", - Kotlin::TypeArgumentsRepeat1 => "type_arguments_repeat1", - Kotlin::TypeProjectionRepeat1 => "type_projection_repeat1", + Kotlin::TypeProjectionModifiersRepeat1 => "type_projection_modifiers_repeat1", Kotlin::FunctionTypeParametersRepeat1 => "function_type_parameters_repeat1", + Kotlin::StatementsRepeat1 => "statements_repeat1", + Kotlin::StatementRepeat1 => "_statement_repeat1", + Kotlin::IndexingSuffixRepeat1 => "indexing_suffix_repeat1", + Kotlin::TypeArgumentsRepeat1 => "type_arguments_repeat1", + Kotlin::ValueArgumentsRepeat1 => "value_arguments_repeat1", + Kotlin::StringLiteralRepeat1 => "string_literal_repeat1", + Kotlin::MultiVariableDeclarationRepeat1 => "multi_variable_declaration_repeat1", Kotlin::LambdaParametersRepeat1 => "lambda_parameters_repeat1", - Kotlin::IndexExpressionRepeat1 => "index_expression_repeat1", Kotlin::WhenExpressionRepeat1 => "when_expression_repeat1", Kotlin::WhenEntryRepeat1 => "when_entry_repeat1", Kotlin::TryExpressionRepeat1 => "try_expression_repeat1", - Kotlin::StringLiteralRepeat1 => "string_literal_repeat1", - Kotlin::MultilineStringLiteralRepeat1 => "multiline_string_literal_repeat1", + Kotlin::PostfixUnaryExpressionRepeat1 => "_postfix_unary_expression_repeat1", + Kotlin::ModifiersRepeat1 => "modifiers_repeat1", + Kotlin::ParameterModifiersRepeat1 => "parameter_modifiers_repeat1", + Kotlin::TypeModifiersRepeat1 => "type_modifiers_repeat1", Kotlin::TypeParameterModifiersRepeat1 => "type_parameter_modifiers_repeat1", - Kotlin::QualifiedIdentifierRepeat1 => "qualified_identifier_repeat1", + Kotlin::IdentifierRepeat1 => "identifier_repeat1", + Kotlin::InterpolatedExpression => "interpolated_expression", + Kotlin::InterpolatedIdentifier => "interpolated_identifier", + Kotlin::TypeIdentifier => "type_identifier", Kotlin::Error => "ERROR", } } diff --git a/src/languages/language_python.rs b/src/languages/language_python.rs index 1d12c16d1..f2dbb4450 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, - ExceptSTAR = 34, + STAR2 = 34, Finally = 35, With = 36, Def = 37, @@ -145,141 +145,140 @@ pub enum Python { WhileStatement = 138, TryStatement = 139, ExceptClause = 140, - 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, + 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, } impl From for &'static str { @@ -320,7 +319,7 @@ impl From for &'static str { Python::While => "while", Python::Try => "try", Python::Except => "except", - Python::ExceptSTAR => "except*", + Python::STAR2 => "*", Python::Finally => "finally", Python::With => "with", Python::Def => "def", @@ -427,7 +426,6 @@ 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", @@ -538,7 +536,7 @@ impl From for &'static str { Python::MatchBlockRepeat1 => "_match_block_repeat1", Python::CaseClauseRepeat1 => "case_clause_repeat1", Python::TryStatementRepeat1 => "try_statement_repeat1", - Python::TryStatementRepeat2 => "try_statement_repeat2", + Python::ExceptClauseRepeat1 => "except_clause_repeat1", 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 e9b9f8e9a..456b49b2e 100644 --- a/src/languages/language_rust.rs +++ b/src/languages/language_rust.rs @@ -23,338 +23,343 @@ pub enum Rust { QMARK = 16, Block2 = 17, Expr = 18, - 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, + 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, } impl From for &'static str { @@ -380,12 +385,14 @@ 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", @@ -560,8 +567,8 @@ impl From for &'static str { Rust::RemovedTraitBound => "removed_trait_bound", Rust::TypeParameters => "type_parameters", Rust::ConstParameter => "const_parameter", - Rust::ConstrainedTypeParameter => "constrained_type_parameter", - Rust::OptionalTypeParameter => "optional_type_parameter", + Rust::TypeParameter => "type_parameter", + Rust::LifetimeParameter => "lifetime_parameter", Rust::LetDeclaration => "let_declaration", Rust::UseDeclaration => "use_declaration", Rust::UseClause => "_use_clause", @@ -588,6 +595,7 @@ 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", @@ -653,6 +661,7 @@ 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", @@ -695,6 +704,7 @@ 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/macros.rs b/src/macros.rs index 5d77925b5..ce11c0cd8 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -8,6 +8,9 @@ macro_rules! get_language { (tree_sitter_tsx) => { tree_sitter_typescript::LANGUAGE_TSX.into() }; + (tree_sitter_kotlin_codanna) => { + tree_sitter_kotlin_codanna::language().into() + }; ($name:ident) => { $name::LANGUAGE.into() }; diff --git a/src/node.rs b/src/node.rs index 49b8df104..2fa1bd9a3 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).map(Node) + self.0.child(pos as u32).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 d9df06f4e..fe02e9bbc 100644 --- a/tree-sitter-ccomment/Cargo.toml +++ b/tree-sitter-ccomment/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-ccomment" description = "Ccomment grammar for the tree-sitter parsing library" -version = "0.20.3" +version = "0.20.4" authors = ["Calixte Denizet "] license = "MIT" readme = "bindings/rust/README.md" @@ -27,4 +27,4 @@ tree-sitter-language="0.1.0" cc = "^1.0" [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.3" diff --git a/tree-sitter-ccomment/bindings/rust/README.md b/tree-sitter-ccomment/bindings/rust/README.md index 854adc4a2..c000c985c 100644 --- a/tree-sitter-ccomment/bindings/rust/README.md +++ b/tree-sitter-ccomment/bindings/rust/README.md @@ -8,7 +8,7 @@ way.) ``` toml [dependencies] -tree-sitter = "0.25.3" +tree-sitter = "0.25.4" tree-sitter-ccomment = "0.20.3" ``` diff --git a/tree-sitter-ccomment/package.json b/tree-sitter-ccomment/package.json index 6b89cd065..e9f17f7ed 100644 --- a/tree-sitter-ccomment/package.json +++ b/tree-sitter-ccomment/package.json @@ -13,7 +13,7 @@ "nan": "^2.14.2" }, "devDependencies": { - "tree-sitter-cli": "^0.25.3" + "tree-sitter-cli": "^0.25.4" }, "scripts": { "build": "tree-sitter generate && node-gyp build", diff --git a/tree-sitter-ccomment/src/parser.c b/tree-sitter-ccomment/src/parser.c index 69011d1f5..c8b2f5f6c 100644 --- a/tree-sitter-ccomment/src/parser.c +++ b/tree-sitter-ccomment/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.3 (2a835ee029dca1c325e6f1c01dbce40396f6123e) */ +/* Automatically @generated by tree-sitter v0.25.4 (726dcd1e872149d95de581589fc408fb8ea9cb0b) */ #include "tree_sitter/parser.h" diff --git a/tree-sitter-ccomment/src/tree_sitter/parser.h b/tree-sitter-ccomment/src/tree_sitter/parser.h index cdbe64ccc..858107deb 100644 --- a/tree-sitter-ccomment/src/tree_sitter/parser.h +++ b/tree-sitter-ccomment/src/tree_sitter/parser.h @@ -18,7 +18,6 @@ typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; -typedef struct TSLanguageMetadata TSLanguageMetadata; typedef struct TSLanguageMetadata { uint8_t major_version; uint8_t minor_version; diff --git a/tree-sitter-mozcpp/Cargo.toml b/tree-sitter-mozcpp/Cargo.toml index 7924acb47..69c82a8d7 100644 --- a/tree-sitter-mozcpp/Cargo.toml +++ b/tree-sitter-mozcpp/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-mozcpp" description = "Mozcpp grammar for the tree-sitter parsing library" -version = "0.20.4" +version = "0.20.5" authors = ["Calixte Denizet "] license = "MIT" readme = "bindings/rust/README.md" @@ -33,4 +33,4 @@ tree-sitter-cpp = "0.23.4" build = ["tree-sitter-cpp"] [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.3" diff --git a/tree-sitter-mozcpp/bindings/rust/README.md b/tree-sitter-mozcpp/bindings/rust/README.md index 307be1f42..f87626fa4 100644 --- a/tree-sitter-mozcpp/bindings/rust/README.md +++ b/tree-sitter-mozcpp/bindings/rust/README.md @@ -8,8 +8,8 @@ way.) ``` toml [dependencies] -tree-sitter = "0.25.3" -tree-sitter-mozcpp = "0.20.4" +tree-sitter = "0.26.3" +tree-sitter-mozcpp = "0.20.5" ``` Typically, you will use the [LANGUAGE][] function to add this diff --git a/tree-sitter-mozcpp/package.json b/tree-sitter-mozcpp/package.json index 26a6e5d56..258e35354 100644 --- a/tree-sitter-mozcpp/package.json +++ b/tree-sitter-mozcpp/package.json @@ -13,7 +13,7 @@ "nan": "^2.14.2" }, "devDependencies": { - "tree-sitter-cli": "^0.25.3" + "tree-sitter-cli": "^0.25.4" }, "scripts": { "build": "tree-sitter generate && node-gyp build", diff --git a/tree-sitter-mozcpp/src/parser.c b/tree-sitter-mozcpp/src/parser.c index 7c68b9013..24c4a59e7 100644 --- a/tree-sitter-mozcpp/src/parser.c +++ b/tree-sitter-mozcpp/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.3 (2a835ee029dca1c325e6f1c01dbce40396f6123e) */ +/* Automatically @generated by tree-sitter v0.25.4 (726dcd1e872149d95de581589fc408fb8ea9cb0b) */ #include "tree_sitter/parser.h" diff --git a/tree-sitter-mozcpp/src/tree_sitter/parser.h b/tree-sitter-mozcpp/src/tree_sitter/parser.h index cdbe64ccc..858107deb 100644 --- a/tree-sitter-mozcpp/src/tree_sitter/parser.h +++ b/tree-sitter-mozcpp/src/tree_sitter/parser.h @@ -18,7 +18,6 @@ typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; -typedef struct TSLanguageMetadata TSLanguageMetadata; typedef struct TSLanguageMetadata { uint8_t major_version; uint8_t minor_version; diff --git a/tree-sitter-mozjs/Cargo.toml b/tree-sitter-mozjs/Cargo.toml index b1f3915fe..afe2e3363 100644 --- a/tree-sitter-mozjs/Cargo.toml +++ b/tree-sitter-mozjs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-mozjs" description = "Mozjs grammar for the tree-sitter parsing library" -version = "0.20.3" +version = "0.20.4" authors = ["Calixte Denizet "] license = "MIT" readme = "bindings/rust/README.md" @@ -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.23.1" +tree-sitter-javascript = "0.25.0" [package.metadata.cargo-udeps.ignore] build = ["tree-sitter-javascript"] [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.3" diff --git a/tree-sitter-mozjs/bindings/rust/README.md b/tree-sitter-mozjs/bindings/rust/README.md index a6bd19573..a42a7b546 100644 --- a/tree-sitter-mozjs/bindings/rust/README.md +++ b/tree-sitter-mozjs/bindings/rust/README.md @@ -8,8 +8,8 @@ way.) ``` toml [dependencies] -tree-sitter = "0.25.3" -tree-sitter-mozjs = "0.20.3" +tree-sitter = "0.26.3" +tree-sitter-mozjs = "0.20.4" ``` Typically, you will use the [language][language func] function to add this diff --git a/tree-sitter-mozjs/package.json b/tree-sitter-mozjs/package.json index d20d76c9f..19c4d0e85 100644 --- a/tree-sitter-mozjs/package.json +++ b/tree-sitter-mozjs/package.json @@ -13,7 +13,7 @@ "nan": "^2.14.2" }, "devDependencies": { - "tree-sitter-cli": "^0.25.3" + "tree-sitter-cli": "^0.25.4" }, "scripts": { "build": "tree-sitter generate && node-gyp build", diff --git a/tree-sitter-mozjs/src/parser.c b/tree-sitter-mozjs/src/parser.c index e47859579..97ef9139f 100644 --- a/tree-sitter-mozjs/src/parser.c +++ b/tree-sitter-mozjs/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.3 (2a835ee029dca1c325e6f1c01dbce40396f6123e) */ +/* Automatically @generated by tree-sitter v0.25.4 (726dcd1e872149d95de581589fc408fb8ea9cb0b) */ #include "tree_sitter/parser.h" diff --git a/tree-sitter-mozjs/src/tree_sitter/parser.h b/tree-sitter-mozjs/src/tree_sitter/parser.h index cdbe64ccc..858107deb 100644 --- a/tree-sitter-mozjs/src/tree_sitter/parser.h +++ b/tree-sitter-mozjs/src/tree_sitter/parser.h @@ -18,7 +18,6 @@ typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; -typedef struct TSLanguageMetadata TSLanguageMetadata; typedef struct TSLanguageMetadata { uint8_t major_version; uint8_t minor_version; diff --git a/tree-sitter-preproc/Cargo.toml b/tree-sitter-preproc/Cargo.toml index 85a564fce..0af7d0854 100644 --- a/tree-sitter-preproc/Cargo.toml +++ b/tree-sitter-preproc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-preproc" description = "Preproc grammar for the tree-sitter parsing library" -version = "0.20.3" +version = "0.20.4" authors = ["Calixte Denizet "] license = "MIT" readme = "bindings/rust/README.md" @@ -27,4 +27,4 @@ tree-sitter-language="0.1.0" cc = "^1.0" [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.3" diff --git a/tree-sitter-preproc/bindings/rust/README.md b/tree-sitter-preproc/bindings/rust/README.md index 5b3baa687..6aa8cb109 100644 --- a/tree-sitter-preproc/bindings/rust/README.md +++ b/tree-sitter-preproc/bindings/rust/README.md @@ -8,7 +8,7 @@ way.) ``` toml [dependencies] -tree-sitter = "0.25.3" +tree-sitter = "0.25.4" tree-sitter-preproc = "0.20.3" ``` diff --git a/tree-sitter-preproc/package.json b/tree-sitter-preproc/package.json index 65ae80aa0..4675d571d 100644 --- a/tree-sitter-preproc/package.json +++ b/tree-sitter-preproc/package.json @@ -13,7 +13,7 @@ "nan": "^2.14.2" }, "devDependencies": { - "tree-sitter-cli": "^0.25.3" + "tree-sitter-cli": "^0.25.4" }, "scripts": { "build": "tree-sitter generate && node-gyp build", diff --git a/tree-sitter-preproc/src/parser.c b/tree-sitter-preproc/src/parser.c index e55ea82c4..446e0c0c3 100644 --- a/tree-sitter-preproc/src/parser.c +++ b/tree-sitter-preproc/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.3 (2a835ee029dca1c325e6f1c01dbce40396f6123e) */ +/* Automatically @generated by tree-sitter v0.25.4 (726dcd1e872149d95de581589fc408fb8ea9cb0b) */ #include "tree_sitter/parser.h" diff --git a/tree-sitter-preproc/src/tree_sitter/parser.h b/tree-sitter-preproc/src/tree_sitter/parser.h index cdbe64ccc..858107deb 100644 --- a/tree-sitter-preproc/src/tree_sitter/parser.h +++ b/tree-sitter-preproc/src/tree_sitter/parser.h @@ -18,7 +18,6 @@ typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; -typedef struct TSLanguageMetadata TSLanguageMetadata; typedef struct TSLanguageMetadata { uint8_t major_version; uint8_t minor_version;