{"id":462421,"date":"2025-06-09T03:01:21","date_gmt":"2025-06-09T03:01:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=462421"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-06-09T03:01:21","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=462421","title":{"rendered":"<span>\u041a\u0440\u0430\u0441\u043d\u043e-\u0437\u0435\u043b\u0435\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f: \u043e\u0431\u0437\u043e\u0440<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u044f \u043d\u0430\u0447\u0430\u043b \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Roslyn, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0440\u0430\u0441\u043d\u043e-\u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. \u041d\u0438\u0436\u0435 &#8212; \u043c\u043e\u044f \u0432\u044b\u0436\u0438\u043c\u043a\u0430, \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0442\u043e\u0433\u0434\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/archive\/blogs\/ericlippert\/persistence-facades-and-roslyns-red-green-trees\" rel=\"noopener noreferrer nofollow\"><strong>Persistence, Facades and Roslyn&#8217;s Red-Green Trees<\/strong><\/a> , \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e, \u043d\u043e \u0451\u043c\u043a\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0435\u0451 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0443\u0448\u0451\u043b \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Roslyn. <\/p>\n<h2>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u043e\u0441\u043b\u0438\u043d\u0430<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0435-\u0447\u0442\u043e \u0443\u044f\u0441\u043d\u0438\u043c, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Roslyn \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u043e\u043d\u0430 \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u044f\u0437\u044b\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0430\u044f \u043d\u043e\u0434\u0430 SyntaxNode, \u0435\u0441\u043b\u0438 \u0431\u044b Roslyn \u0431\u044b\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f C#, \u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 RawKind, CreateSeparator \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5d9\/7af\/221\/5d97af221b5aef5b104e9438b057fb88.png\" alt=\"\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 SyntaxNode\" title=\"\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 SyntaxNode\" width=\"2212\" height=\"1248\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/5d9\/7af\/221\/5d97af221b5aef5b104e9438b057fb88.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5d9\/7af\/221\/5d97af221b5aef5b104e9438b057fb88.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 SyntaxNode<\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxTree<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430; \u0434\u0430\u0451\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 <code>CompilationUnitSyntax<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxNode<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u043e\u0434\u0430 (statement, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f\u2026).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxToken<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u043e\u0434\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c (<code>if<\/code>, <code>{<\/code>, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxTrivia<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043f\u0440\u043e\u0431\u0435\u043b\u044b, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, <code>#region<\/code> &#8212; \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxList&lt;T&gt;<\/code> \/ <code>SeparatedSyntaxList&lt;T&gt;<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434, \u0447\u0430\u0441\u0442\u043e \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043d\u0438 \u043a C#, \u043d\u0438 \u043a VB.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u043d\u043e\u0434\u0430<\/h2>\n<p>\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0430\u044f, \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435, \u043f\u043e \u0441\u0443\u0442\u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u044d\u0442\u043e SyntaxTree + \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c + \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 + \u0417\u0435\u043b\u0435\u043d\u0430\u044f \u043d\u043e\u0434\u0430<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6f5\/6d5\/7c8\/6f56d57c8bb21a6ac45803792723125a.png\" alt=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 SyntaxNode(\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u043d\u043e\u0434\u044b)\" title=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 SyntaxNode(\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u043d\u043e\u0434\u044b)\" width=\"2212\" height=\"1248\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6f5\/6d5\/7c8\/6f56d57c8bb21a6ac45803792723125a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6f5\/6d5\/7c8\/6f56d57c8bb21a6ac45803792723125a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 SyntaxNode(\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u043d\u043e\u0434\u044b)<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043d\u043e\u0434\u0435, \u043d\u0435 \u0432 \u043a\u0440\u0430\u0441\u043d\u043e\u0439, \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043b\u0438\u0448\u044c &#171;\u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u043d\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0443&#187;, \u0438 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0435\u043c \u0437\u0435\u043b\u0451\u043d\u0430\u044f.<\/p>\n<p>\u041a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b (\u043a\u0430\u043a \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0435) \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b, \u043d\u043e \u0438\u0445 \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c &#8212; \u043d\u0435 \u0434\u043b\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432: \u043b\u044e\u0431\u043e\u0439 <code>SyntaxNode<\/code> \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. <\/p>\n<p>\u0414\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u043d\u0435 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u0436\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c &#8212; \u0432\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e. <\/p>\n<p>\u041b\u044e\u0431\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u00ab\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0449\u0438\u0439\u00bb \u043a\u0440\u0430\u0441\u043d\u0443\u044e \u043d\u043e\u0434\u0443, \u043d\u0430 \u0434\u0435\u043b\u0435 \u00ad\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438; \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">var left  = SyntaxFactory.IdentifierName(\"a\"); var right = SyntaxFactory.IdentifierName(\"b\"); var sum   = SyntaxFactory.BinaryExpression(     SyntaxKind.AddExpression,     left,     SyntaxFactory.Token(SyntaxKind.PlusToken),     right);<\/code><\/pre>\n<p><code>left != sum.Left<\/code> &#8212; \u044d\u0442\u043e <em>\u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u0430: \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438, \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0438 \u0434\u0430\u0436\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. <\/p>\n<h2>SyntaxToken \u0438 SyntaxTrivia<\/h2>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u043e\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043d\u043e\u0434\u0430\u043c, \u043d\u043e \u0441 \u043d\u044e\u0430\u043d\u0441\u043e\u043c: \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043c\u043e\u0436\u0435\u0442 \u0438 <em>\u043d\u0435<\/em> \u0437\u043d\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0451\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, <code>SyntaxToken<\/code> \u0431\u044b\u0432\u0430\u0435\u0442 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>\u0415\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0441 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0434\u0435\u0440\u0435\u0432\u043e\u043c:<\/strong><br \/>\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 + \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f + \u0438\u043d\u0434\u0435\u043a\u0441 (\u043e \u043d\u0451\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435) + \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0442 \u0441\u0432\u044f\u0437\u0438:<\/strong><br \/>\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><code>SyntaxTrivia<\/code> \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0430\u043a:<\/p>\n<p><code>SyntaxToken<\/code> + \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430 + \u043f\u043e\u0437\u0438\u0446\u0438\u044f + \u0438\u043d\u0434\u0435\u043a\u0441 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e\u0431 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 &#8212; \u043f\u043e\u0437\u0436\u0435).<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b? \u041b\u044e\u0431\u0430\u044f \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u043e; \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u0443\u0437\u0435\u043b \u0447\u0435\u0440\u0435\u0437 <code>SyntaxFactory.BinaryExpression<\/code>, \u0443 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e. \u0417\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 &#8212; \u0430\u0431\u0441\u0443\u0440\u0434, \u0441 <code>SyntaxTrivia<\/code> \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430.<\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u0434\u0438, \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0435\u043d\u0438\u0432\u043e: \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438, \u043f\u043e\u0438\u0441\u043a \u0438\u0434\u0451\u0442 \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u043d\u043e\u0434\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0435\u0440\u0435\u0432\u043e \u0443\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e; \u0435\u0441\u043b\u0438 \u0438 \u0442\u0430\u043c \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f &#8212; \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e.<\/p>\n<h2>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b<\/h2>\n<p>\u0412\u0441\u044f \u043c\u0430\u0433\u0438\u044f \u0442\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c: \u043f\u043e \u0441\u0443\u0442\u0438, \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b &#8212; \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u00ab\u043e\u0431\u0451\u0440\u0442\u043a\u0430\u00bb \u0432\u043e\u043a\u0440\u0443\u0433 \u0437\u0435\u043b\u0451\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0438 \u043a\u0440\u0430\u0441\u043d\u043e\u0439.<\/p>\n<p>\u0427\u0442\u043e \u0435\u0441\u0442\u044c \u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b? \u041d\u0443\u2026 \u043f\u0440\u043e\u0449\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0435\u0433\u043e \u0443 \u043d\u0435\u0451 <strong>\u043d\u0435\u0442<\/strong>.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f9\/3ed\/c80\/4f93edc80878ba16af3aa38de5593dbb.png\" alt=\"\u0417\u0435\u043b\u0435\u043d\u0430\u044f \u043d\u043e\u0434\u0430\" title=\"\u0417\u0435\u043b\u0435\u043d\u0430\u044f \u043d\u043e\u0434\u0430\" width=\"2212\" height=\"1249\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4f9\/3ed\/c80\/4f93edc80878ba16af3aa38de5593dbb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f9\/3ed\/c80\/4f93edc80878ba16af3aa38de5593dbb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0417\u0435\u043b\u0435\u043d\u0430\u044f \u043d\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b (\u043a\u0430\u043a \u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435) \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0445, \u043f\u043e \u0437\u0435\u043b\u0451\u043d\u044b\u043c \u043d\u043e\u0434\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e <strong>\u0432\u043d\u0438\u0437<\/strong>: \u043e\u043d\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e \u0441\u0432\u043e\u0438\u0445 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f\u0445. \u0423 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434 \u043d\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 &#8212; \u0442\u043e\u043b\u044c\u043a\u043e <strong>\u0448\u0438\u0440\u0438\u043d\u0430<\/strong> (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>if<\/code> &#8212; \u0434\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430).<\/p>\n<p> \u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u0421 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e (\u2248 95 %) \u0432\u0441\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 (<code>for<\/code>, <code>if<\/code>, <code>var<\/code>, <code>int<\/code>, <code>async<\/code>, <code>await<\/code> \u0438 \u0442. \u0434.) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u043e\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <code><strong>TokenWithWellKnownText<\/strong><\/code> (\u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0447\u0435\u0439 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d &#8212; \u043a\u0430\u0432\u044b\u0447\u043a\u0438, \u0437\u043d\u0430\u043a\u0438 \u00ab+\u00bb, \u00ab-\u00bb, \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430) \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f <strong>\u043f\u044f\u0442\u044c<\/strong> \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3d8\/098\/5f5\/3d80985f5e95ba37c73ea0a4ff2c915e.png\" alt=\"5 \u0432\u0438\u0434\u043e\u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\" title=\"5 \u0432\u0438\u0434\u043e\u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\" width=\"2212\" height=\"1249\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3d8\/098\/5f5\/3d80985f5e95ba37c73ea0a4ff2c915e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3d8\/098\/5f5\/3d80985f5e95ba37c73ea0a4ff2c915e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>5 \u0432\u0438\u0434\u043e\u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0412\u0430\u0440\u0438\u0430\u043d\u0442<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043e\u043b\u0435 \u043a\u0435\u0448\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0411\u0435\u0437 trivia<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L144\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithNoTrivia<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0434\u0438\u043d \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if_<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L146\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithSingleTrailingSpace<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u00ab\u042d\u043b\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f\u00bb trivia<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if{elastic}<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L145C61-L145C87\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithElasticTrivia<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0441\u043b\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if\u23ce<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L147C61-L147C92\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithSingleTrailingCRLF<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u00abMissing\u00bb-\u0442\u043e\u043a\u0435\u043d<\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439<\/em> <code>;<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L148\" rel=\"noopener noreferrer nofollow\"><strong>s_missingTokensWithNoTrivia<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<blockquote>\n<p><strong>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 elastic trivia<\/strong><\/p>\n<p>\u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u00ab\u0440\u0435\u0437\u0438\u043d\u043e\u0432\u0430\u044f\u00bb \u0432\u0441\u0442\u0430\u0432\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a IDE \u043c\u043e\u0436\u0435\u0442 <strong>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c<\/strong> \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c\/\u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u043a\u043e\u0434\u0430: \u043c\u043e\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c AST \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Roslyn.<\/p>\n<\/blockquote>\n<p>\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>if<\/code><\/p>\n<pre><code class=\"cs\">if (...)<\/code><\/pre>\n<p>\u043f\u0430\u0440\u0441\u0435\u0440 \u0432\u043e\u0437\u044c\u043c\u0451\u0442 \u0443\u0436\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u0434\u043b\u044f <code>if<\/code> (\u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0441 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c \u043f\u043e\u0441\u043b\u0435). \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">if \/\/ \u0431\u0435\u0433\u0438\u0442\u0435 \u044f \u0447\u043e\u043a\u043d\u0443\u0442\u043d\u044b\u0439 (...) \/\/ \u0438\u043b\u0438 \u0442\u0430\u043a for \/* \u0441\u0430\u043d\u044f \u0442\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 ? *\/ (...)<\/code><\/pre>\n<p>\u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 <strong>\u043d\u043e\u0432\u044b\u0439<\/strong> \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e.<\/p>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u0433\u0434\u0435 \u043f\u0440\u0438 <strong>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438<\/strong> \u0434\u0430\u0436\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0434\u0435\u0440\u0435\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0441 \u0437\u0435\u043b\u0451\u043d\u044b\u043c \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043c\u044f\u0433\u0447\u0435: \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u0435\u043b\u0451\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u043e \u043e\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 99 % \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0435. \u0423 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434<br \/><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L961C38-L961C47\" rel=\"noopener noreferrer nofollow\"><strong>abstract RedNode CreateRed(RedNode? parent, int position)<\/strong><\/a><br \/>(<code>RedNode<\/code> &#8212; \u044d\u0442\u043e <code>SyntaxNode<\/code>; \u044f \u043f\u0438\u0448\u0443 \u0442\u0430\u043a \u0434\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438).<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc0\/301\/d56\/cc0301d564e813ab1a4c098590029584.png\" alt=\"\u0440\u0430\u0431\u043e\u0442\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438\" title=\"\u0440\u0430\u0431\u043e\u0442\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438\" width=\"2212\" height=\"1248\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cc0\/301\/d56\/cc0301d564e813ab1a4c098590029584.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc0\/301\/d56\/cc0301d564e813ab1a4c098590029584.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0440\u0430\u0431\u043e\u0442\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0423 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434 \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430 &#8212; <code><strong>GreenSyntaxFactory<\/strong><\/code><br \/>(\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043e\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/a656d1adeb3c751c7acefba23e4c98729e1efb99\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxFactory.cs\" rel=\"noopener noreferrer nofollow\"><strong>SyntaxFactory<\/strong><\/a>). \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u0443\u0436\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0451.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 &#8212; \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u0443\u044e \u0438 <strong>\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f<\/strong> \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0424\u0430\u0431\u0440\u0438\u043a\u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u043d\u043e\u0434 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (<code>SyntaxNode<\/code>, <code>SyntaxToken<\/code>, <code>SyntaxTrivia<\/code>) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u0432 \u043a\u0440\u0430\u0441\u043d\u0443\u044e.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430 <strong>\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442<\/strong> \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u043a\u043e\u0434\u0443. \u042d\u0442\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432\u0441\u0435\u0439 \u00ab\u0437\u0435\u043b\u0451\u043d\u043e\u0439\u00bb \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b &#8212; \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Roslyn \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c <code>throw<\/code>: \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0438 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 Public API, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e. \u0412 production-\u0432\u0435\u0440\u0441\u0438\u0438 Roslyn \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u00ab\u043a\u0440\u0430\u0441\u043d\u0430\u044f\u00bb \u0441\u0442\u043e\u0440\u043e\u043d\u0430.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f: BinaryExpressionSyntax<\/h4>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 <strong>\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c<\/strong> \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443, \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 &#8212; \u044d\u0442\u043e \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u0437\u0435\u043b\u0451\u043d\u043e\u0439. \u041d\u0438\u0436\u0435 &#8212; \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u044b\u0439 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">public sealed partial class BinaryExpressionSyntax : ExpressionSyntax {     \/\/ \u041b\u0435\u043d\u0438\u0432\u044b\u0435 (!) \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0443\u0437\u043b\u044b     internal ExpressionSyntax? _left;     internal ExpressionSyntax? _right;      internal BinaryExpressionSyntax(GreenBinaryExpressionSyntax green,                                     RedNode? parent,                                     int position)         : base(green, parent, position) { }      internal BinaryExpressionSyntax(GreenBinaryExpressionSyntax green,                                     int position,                                     SyntaxTree syntaxTree)         : base(green, position, syntaxTree) { }      \/\/ \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u00ab\u043a\u0430\u0441\u0442\u00bb \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b     internal new GreenBinaryExpressionSyntax Green =&gt;         System.Runtime.CompilerServices.Unsafe.As&lt;GreenBinaryExpressionSyntax&gt;(base.Green);      \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f     public ExpressionSyntax Left  =&gt; GetRed(ref _left, 0)!;      \/\/ OperatorToken \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u2015 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 SyntaxToken     public SyntaxToken OperatorToken =&gt;         new(Parent, Green.OperatorToken, GetChildPosition(1), GetChildIndex(1));      \/\/ \u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f     public ExpressionSyntax Right =&gt; GetRed(ref _right, 2)!;      \/\/ \u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u0443\u0437\u043b\u0430\u043c     public override RedNode? GetNodeSlot(int index) =&gt;         index switch         {             0 =&gt; GetRed(ref _left, 0)!,             \/\/ \u042d\u043b\u0435\u043c\u0435\u043d\u0442 c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c 1 \u2015 \u044d\u0442\u043e `OperatorToken`             2 =&gt; GetRed(ref _right, 2)!,             _ =&gt; null         }; }  internal sealed partial class GreenBinaryExpressionSyntax : GreenExpressionSyntax {     \/\/ \u0418\u0441\u0442\u0438\u043d\u043d\u044b\u0435 \u00ab\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0438\u00bb \u0434\u0430\u043d\u043d\u044b\u0445     public readonly GreenExpressionSyntax Left;     public readonly GreenSyntaxToken      OperatorToken;     public readonly GreenExpressionSyntax Right;      public GreenBinaryExpressionSyntax(GreenExpressionSyntax left,                                        GreenSyntaxToken operatorToken,                                        GreenExpressionSyntax right,                                        DiagnosticInfo[]? diagnostics = null,                                        SyntaxAnnotation[]? annotations = null)         : base(SyntaxKind.None, diagnostics, annotations)     {         Left          = left;         OperatorToken = operatorToken;         Right         = right;     }      public override GreenNode? GetSlot(int index) =&gt;         index switch         {             0 =&gt; Left,             1 =&gt; OperatorToken,             2 =&gt; Right,             _ =&gt; null         };      public override RedNode CreateRed(RedNode? parent, int position) =&gt;         new BinaryExpressionSyntax(this, parent, position); } <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, <strong>\u0437\u0435\u043b\u0451\u043d\u0430\u044f<\/strong> \u043d\u043e\u0434\u0430 \u2015 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445; <strong>\u043a\u0440\u0430\u0441\u043d\u0430\u044f<\/strong> \u043b\u0438\u0448\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u043d\u0430\u0440\u0443\u0436\u0443. <\/p>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/SyntaxNode.cs#L172\" rel=\"noopener noreferrer nofollow\"><strong>GetRed <\/strong><\/a><\/p>\n<pre><code class=\"cs\">protected T? GetRed&lt;T&gt;(ref T? field, int slot) where T : RedNode {     var result = field;      if (result == null)     {         var green = this.Green.GetSlot(slot);         if (green != null)         {             Interlocked.CompareExchange(                 ref field,                 (T)green.CreateRed(this, GetChildPosition(slot)),                 comparand: null);              result = field;         }     }      return result; }<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/SyntaxNode.cs#L172\" rel=\"noopener noreferrer nofollow\"><strong>GetRed <\/strong><\/a>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <strong>\u043b\u0435\u043d\u0438\u0432\u043e\u0435<\/strong> \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u043a\u0440\u0430\u0441\u043d\u0443\u044e:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u0435\u0448.<\/strong> \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 (<code>field<\/code> != <code>null<\/code>), \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0435\u0451.<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0440\u0451\u043c \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043d\u043e\u0434\u0443.<\/strong> \u041c\u0435\u0442\u043e\u0434 <code>Green.GetSlot(slot)<\/code> \u0434\u0430\u0451\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u00ab\u0437\u0435\u043b\u0451\u043d\u043e\u0433\u043e\u00bb \u0440\u0435\u0431\u0451\u043d\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u0440\u0430\u0441\u043d\u0443\u044e \u043e\u0431\u0451\u0440\u0442\u043a\u0443.<\/strong> \u0412\u044b\u0437\u043e\u0432 <code>green.CreateRed(...)<\/code> \u0441\u0442\u0440\u043e\u0438\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0443\u0437\u0435\u043b, \u0437\u043d\u0430\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e.<\/strong> <code>Interlocked.CompareExchange<\/code> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0443\u0432\u0438\u0434\u044f\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443<\/strong> (\u043b\u0438\u0431\u043e <code>null<\/code>, \u0435\u0441\u043b\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430 \u043d\u0435\u0442).<\/p>\n<\/li>\n<\/ol>\n<h2>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434<\/h2>\n<h3>RawKind<\/h3>\n<p>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u0432 Roslyn \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u044d\u0442\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 &#8212; \u043f\u043e\u043b\u0435 <code><strong>RawKind<\/strong><\/code>.<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e? \u042d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0434\u0435\u0448\u0451\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0437\u043d\u0430\u0442\u044c \u0442\u0438\u043f \u0443\u0437\u043b\u0430: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e \u0446\u0435\u043b\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c <code>node is BinaryExpressionSyntax<\/code>.<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e<\/strong> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u043a\u0430\u043a <code>int<\/code> (32 \u0431\u0438\u0442\u0430):<\/p>\n<pre><code class=\"cs\">public int RawKind { get; }<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043d\u043e \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u0435 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L39\" rel=\"noopener noreferrer nofollow\"><strong>_kind<\/strong> <\/a>\u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c <code>ushort<\/code> (16 \u0431\u0438\u0442), \u0447\u0442\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/CSharp\/Portable\/Syntax\/SyntaxKind.cs#L16\" rel=\"noopener noreferrer nofollow\"><strong><em>SyntaxKind.cs<\/em><\/strong><\/a>, \u0442\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 C# \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 <strong>8193<\/strong>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0440\u043e\u0441\u0441-\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b (<a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/CSharp\/Portable\/Syntax\/SyntaxKind.cs#L12\" rel=\"noopener noreferrer nofollow\"><strong>ListKind<\/strong><\/a>). \u0417\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u2248 800 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0437\u0430\u043d\u044f\u0442\u044b VB-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/VisualBasic\/Portable\/Syntax\/SyntaxKind.vb#L18\" rel=\"noopener noreferrer nofollow\"><strong><em>SyntaxKind.vb<\/em><\/strong><\/a>, \u0438 \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c C#. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 13-\u0433\u043e \u0431\u0438\u0442\u0430? \u0414\u0430 \u043a\u0442\u043e \u0435\u0433\u043e \u0437\u043d\u0430\u0435\u0442, \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0432\u0430 \u044f\u0437\u044b\u043a\u0430 \u0435\u0434\u0438\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u0442\u0438\u043f\u0430 \u0432\u043e\u043d \u0435\u0441\u043b\u0438 13 \u0431\u0438\u0442 \u0430\u043a\u0442\u0438\u0432\u0435\u043d \u0437\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e c#.<\/p>\n<h3>SlotCount<\/h3>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u00ab\u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445\u00bb \u0441\u043b\u043e\u0442\u043e\u0432. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L150C9-L150C29\" rel=\"noopener noreferrer nofollow\"><strong>SlotCount<\/strong> <\/a>\u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0445.<\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u043e:<\/strong> \u0443 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0443\u0437\u043b\u043e\u0432 (\u2248 99 %) <em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0442\u043e\u0432 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430<\/em>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 <code>FieldDeclarationSyntax<\/code> \u0438\u0445 <strong>\u0432\u0441\u0435\u0433\u0434\u0430 \u0447\u0435\u0442\u044b\u0440\u0435<\/strong> &#8212; \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0437 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u043f\u0443\u0441\u0442\u044b. \u041b\u0438\u0448\u044c \u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445 \u00ab\u043e\u0441\u043e\u0431\u044b\u0445\u00bb \u0443\u0437\u043b\u043e\u0432 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>GetSlotCount()<\/code>: \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0442\u043e\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 &#8212; <code>FieldDeclarationSyntax<\/code>:<\/p>\n<pre><code class=\"cs\">[Attribute] public int a;<\/code><\/pre>\n<ul>\n<li>\n<p><code>AttributeLists<\/code><\/p>\n<\/li>\n<li>\n<p><code>Modifiers<\/code><\/p>\n<\/li>\n<li>\n<p><code>VariableDeclaration<\/code> (<code>int a<\/code>)<\/p>\n<\/li>\n<li>\n<p><code>SemicolonToken<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435\u0433\u043e <strong>4<\/strong> \u0441\u043b\u043e\u0442\u0430. \u0410 \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e<\/p>\n<pre><code class=\"cs\">int a;<\/code><\/pre>\n<p>\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0442, \u043d\u043e <strong>\u0438\u043d\u0434\u0435\u043a\u0441\u044b<\/strong> \u0441\u043b\u043e\u0442\u043e\u0432 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f:<\/p>\n<pre><code class=\"cs\">internal readonly GreenNode? attributeLists; internal readonly GreenNode? modifiers; internal readonly VariableDeclarationSyntax declaration; internal readonly SyntaxToken semicolonToken;  internal override GreenNode? GetSlot(int index) =&gt; index switch {     0 =&gt; attributeLists,     1 =&gt; modifiers,     2 =&gt; declaration,     3 =&gt; semicolonToken,     _ =&gt; null }; <\/code><\/pre>\n<p>\u041f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 <code>null<\/code>, \u043d\u043e \u0441\u0447\u0451\u0442 \u0438\u0434\u0451\u0442 <strong>\u0442\u0435\u043c \u0436\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c<\/strong>.<\/p>\n<h4>\u041a\u0430\u043a \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d SlotCount<\/h4>\n<p>\u041f\u043e\u043b\u0435 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.NodeFlagsAndSlotCount.cs#L33\" rel=\"noopener noreferrer nofollow\"><strong>_data <\/strong><\/a>\u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0445\u0440\u0430\u043d\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u0442\u043e\u0432. \u0427\u0435\u0442\u044b\u0440\u0435 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u0438\u0442\u0430 \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0442\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0411\u0435\u0440\u0443\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 <strong>4<\/strong> \u0431\u0438\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 = 15 (<a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L37C29-L37C46\" rel=\"noopener noreferrer nofollow\"><strong>SlotCountTooLarge<\/strong><\/a>), \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L177\" rel=\"noopener noreferrer nofollow\"><strong>GetSlotCount()<\/strong><\/a> &#8212; \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0443 \u0440\u0435\u0434\u043a\u0438\u0445 \u0443\u0437\u043b\u043e\u0432, \u0433\u0434\u0435 \u0441\u043b\u043e\u0442\u043e\u0432 &gt; 15.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0430\u0447\u0435 \u0447\u0438\u0441\u043b\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u0442\u044c \u0438 \u00ab\u043e\u0431\u043b\u0435\u0433\u0447\u0451\u043d\u043d\u043e\u0435\u00bb \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.NodeFlagsAndSlotCount.cs#L39\" rel=\"noopener noreferrer nofollow\"><strong>SmallSlotCount<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 <strong>\u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a<\/strong> \u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u0435 \u0436\u0435 4 \u0431\u0438\u0442\u0430. \u041e\u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 &#8212; \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e <code>SlotCount<\/code>. \u0422\u0430\u043a\u043e\u0439 \u043c\u0438\u043a\u0440\u043e-\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 Roslyn \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e :-).<\/p>\n<h3>\u0424\u043b\u0430\u0433\u0438<\/h3>\n<p>\u041c\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u0438\u0442\u0430 \u0432 \u043f\u043e\u043b\u0435 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.NodeFlagsAndSlotCount.cs#L33\" rel=\"noopener noreferrer nofollow\"><strong>_data <\/strong><\/a>\u043e\u0442\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434 <code>SlotCount<\/code>. <strong>\u0427\u0442\u043e \u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 12?<\/strong> \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 12 \u0431\u0438\u0442\u043e\u0432 \u043f\u043e\u043b\u044f <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.NodeFlagsAndSlotCount.cs#L33\" rel=\"noopener noreferrer nofollow\"><strong>_data <\/strong><\/a>\u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 <strong>\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u043b\u0430\u0433\u0438<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Roslyn \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u0435. \u041f\u0440\u0438\u0432\u0435\u0442 \u0432\u0441\u0435\u043c \u0431\u0430\u0439\u0442\u043e\u0434\u0440\u043e\u0447\u0435\u0440\u0430\u043c.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0424\u043b\u0430\u0433<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>IsNotMissing<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0437\u0435\u043b \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 (\u043d\u0435 \u00abmissing\u00bb).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>HasAnnotationsDirectly<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423 \u0441\u0430\u043c\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0435\u0441\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>FactoryContextIsInAsync<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0437\u0435\u043b \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 <code>async<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>FactoryContextIsInQuery<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u043d \u0432\u043d\u0443\u0442\u0440\u0438 LINQ-\u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>FactoryContextIsInFieldKeywordContext<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <code>field<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>ContainsAnnotations<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u0432\u043d\u0438\u0437: <strong>\u043b\u044e\u0431\u043e\u0439<\/strong> \u043f\u043e\u0442\u043e\u043c\u043e\u043a \u0438\u043c\u0435\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>ContainsAttributes<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041b\u044e\u0431\u043e\u0439 \u043f\u043e\u0442\u043e\u043c\u043e\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>ContainsDiagnostics<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u0435 \u0435\u0441\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>ContainsDirectives<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>ContainsSkippedText<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u0441\u0435\u0433\u043e \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u0435\u0441\u044f\u0442\u044c; \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0434\u0432\u0430 \u0431\u0438\u0442\u0430 \u043f\u043e\u043a\u0430 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u044b.<\/p>\n<h4>\u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0435 \u0444\u043b\u0430\u0433\u0438<\/h4>\n<p>\u0421\u0435\u043c\u044c \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u00ab\u043f\u043e\u0434\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f\u00bb \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443. \u0415\u0441\u043b\u0438 \u0443 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b, \u0441\u043a\u0430\u0436\u0435\u043c, <code>ContainsAnnotations == true<\/code>, \u0442\u043e \u044d\u0442\u043e\u0442 \u0431\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u0434\u043e \u043a\u043e\u0440\u043d\u044f. Roslyn \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 <strong>OR<\/strong> \u043f\u0440\u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430.<\/p>\n<pre><code class=\"cs\">InheritMask =    IsNotMissing    | ContainsAnnotations    | ContainsAttributes    | ContainsDiagnostics    | ContainsDirectives    | ContainsSkippedText    | ContainsStructuredTrivia<\/code><\/pre>\n<h3>FullWidth<\/h3>\n<p><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L41\" rel=\"noopener noreferrer nofollow\"><strong>FullWidth <\/strong><\/a>&#8212; \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u0430\u044f <strong>\u0434\u043b\u0438\u043d\u0430<\/strong> \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445:  <\/p>\n<pre><code class=\"cs\">FullWidth = Width              \/\/ \u00ab\u0442\u0435\u043b\u043e\u00bb \u0443\u0437\u043b\u0430           + LeadingTriviaWidth  \/\/ \u043f\u0440\u043e\u0431\u0435\u043b\u044b\/\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0441\u043b\u0435\u0432\u0430 (leading)           + TrailingTriviaWidth \/\/ \u043f\u0440\u043e\u0431\u0435\u043b\u044b\/\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0441\u043f\u0440\u0430\u0432\u0430 (trailing) <\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9f6\/506\/9c1\/9f65069c1e55253fc1625a63364f7568.png\" alt=\"\u0411\u0438\u0442\u044b \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043d\u043e\u0434\u044b\" title=\"\u0411\u0438\u0442\u044b \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043d\u043e\u0434\u044b\" width=\"2212\" height=\"1248\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9f6\/506\/9c1\/9f65069c1e55253fc1625a63364f7568.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9f6\/506\/9c1\/9f65069c1e55253fc1625a63364f7568.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0411\u0438\u0442\u044b \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043d\u043e\u0434\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043b\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u0430\u043a <code>uint<\/code> (32 \u0431\u0438\u0442\u0430). \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u00ab\u043f\u0430\u043a\u0435\u0442\u00bb \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0411\u0438\u0442\u044b<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u043c<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>SlotCount<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">12<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0424\u043b\u0430\u0433\u0438 (<code>IsNotMissing<\/code>, <code>ContainsDiagnostics<\/code> \u0438 \u0434\u0440.)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">16<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>RawKind<\/code> (<code>SyntaxKind<\/code>)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">32<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>FullWidth<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<blockquote>\n<p>\u0418\u0442\u043e\u0433\u043e: <strong>64 \u0431\u0438\u0442\u0430<\/strong> (8 \u0431\u0430\u0439\u0442) \u043d\u0430 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e &#8212; \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 Roslyn \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0442\u0438\u043f \u0443\u0437\u043b\u0430, \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440, \u043d\u0430\u0431\u043e\u0440 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445\/\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0441\u043b\u043e\u0442\u043e\u0432.<\/p>\n<\/blockquote>\n<h3>\u00ab\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435\u00bb \u0444\u043b\u0430\u0433\u0438<\/h3>\n<p>\u0423 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <code>GreenNode<\/code> \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <strong>\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432-\u0444\u043b\u0430\u0433\u043e\u0432<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u0430\u0445: <\/p>\n<pre><code class=\"cs\">public virtual bool IsStructuredTrivia            =&gt; false; public virtual bool IsDirective                   =&gt; false; public virtual bool IsToken                       =&gt; false; public virtual bool IsTrivia                      =&gt; false; public virtual bool IsSkippedTokensTrivia         =&gt; false; public virtual bool IsDocumentationCommentTrivia  =&gt; false;<\/code><\/pre>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 <code>IsTrivia<\/code> (\u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0435\u0433\u043e \u043f\u043e\u0434\u0432\u0438\u0434\u043e\u0432 [<code>IsStructuredTrivia<\/code>, <code>IsDirective<\/code>, <code>IsSkippedTokensTrivia<\/code>, <code>IsDocumentationCommentTrivia<\/code>] ) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>true<\/code>, \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u0432 <code>SyntaxTrivia<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 <code>IsToken == true<\/code>, \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 <code>SyntaxToken<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u00ab\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435\u00bb \u0444\u043b\u0430\u0433\u0438 <strong>\u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u0438<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430: \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0436\u0435 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0435\u0442.<\/p>\n<h2>Green SyntaxList<\/h2>\n<p><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.cs#L10\" rel=\"noopener noreferrer nofollow\"><strong>GreenSyntaxList<\/strong><\/a> &#8212; \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0443\u0437\u0435\u043b, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <strong>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f<\/strong>. \u041d\u043e \u0438 \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.cs#L10\" rel=\"noopener noreferrer nofollow\"><strong>GreenSyntaxList<\/strong><\/a> \u043a\u0440\u043e\u0441\u0441\u044f\u0437\u044b\u0447\u043d\u044b\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 Vb \u0442\u0430\u043a \u0438 \u0432 c#.<\/p>\n<h3>\u041a\u0440\u0430\u0441\u043d\u044b\u0435 \u043e\u0431\u0451\u0440\u0442\u043a\u0438<\/h3>\n<p>\u0417\u0435\u043b\u0451\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0432 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 <code><strong>SyntaxList<\/strong><\/code>, \u043b\u0438\u0431\u043e \u0432 <code><strong>SeparatedSyntaxList<\/strong><\/code> (\u0442\u0430 \u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043d\u043e \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438 &#8212; \u0437\u0430\u043f\u044f\u0442\u044b\u0435, \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u0442. \u0434.). <\/p>\n<h3>\u041c\u0438\u043a\u0440\u043e-\u0441\u043f\u0438\u0441\u043a\u0438 (\u2264 3 \u0434\u0435\u0442\u0435\u0439)<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u2264 3 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0444\u0430\u0431\u0440\u0438\u043a\u0430 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L903\" rel=\"noopener noreferrer nofollow\"><strong>GreenSyntaxList.List(\u2026)<\/strong><\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 <strong>\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435<\/strong> \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0445 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041a\u043e\u043b-\u0432\u043e \u0434\u0435\u0442\u0435\u0439<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041a\u043b\u0430\u0441\u0441<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u0443\u0437\u0435\u043b-\u0440\u0435\u0431\u0451\u043d\u043e\u043a<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043a\u0435\u0448 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithTwoChildren.cs#L11\" rel=\"noopener noreferrer nofollow\"><strong>WithTwoChildren<\/strong><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u043e\u043b\u044f <code><em>child0<\/em><\/code><em>, <\/em><code>child1<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithThreeChildren.cs#L11\" rel=\"noopener noreferrer nofollow\"><strong>WithThreeChildren<\/strong><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u043e\u043b\u044f <code><em>child0<\/em><\/code><em>, <\/em><code>child1<\/code>, <code>_child2<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 (4 \u2013 9 \u0434\u0435\u0442\u0435\u0439) &#8212; WithManyChildren<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0435\u0442\u0435\u0439 <strong>\u043e\u0442 4 \u0434\u043e 9<\/strong> \u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u043e\u0442\u0434\u0430\u0451\u0442 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithManyChildren.cs#L93\" rel=\"noopener noreferrer nofollow\"><strong>WithManyChildren<\/strong><\/a>:<\/p>\n<pre><code class=\"cs\">public static GreenSyntaxList List(GreenNode[] children) {     return children.Length &lt; 10          ? new WithManyChildren(children)          : new WithLotsOfChildren(children); }<\/code><\/pre>\n<p><em>\u0421\u0435\u043a\u0440\u0435\u0442<\/em>: \u043a\u043b\u0430\u0441\u0441 <strong>\u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442<\/strong> <code>GetSlotOffset<\/code> \u0438 <code>FindSlotIndexContainingOffset<\/code> &#8212; \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e 4\u20139 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f.\u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<h3>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 (\u2265 10 \u0434\u0435\u0442\u0435\u0439) &#8212; WithLotsOfChildren <\/h3>\n<p>\u0414\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithLotsOfChildren.cs#L12\" rel=\"noopener noreferrer nofollow\"><strong>WithLotsOfChildren<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0445 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithLotsOfChildren.cs#L14C36-L14C49\" rel=\"noopener noreferrer nofollow\"><strong>_childOffsets<\/strong><\/a>:<\/p>\n<pre><code class=\"cs\">private readonly int[] _childOffsets;  public override int GetSlotOffset(int index)          \/\/ O(1)     =&gt; _childOffsets[index];  public override int FindSlotIndexContainingOffset(int offset) \/\/ O(log N)     =&gt; _childOffsets.BinarySearchUpperBound(offset) - 1;  \/\/ \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438  public virtual int FindSlotIndexContainingOffset(int offset) \/\/ O(N)  {     Debug.Assert(0 &lt;= offset &amp;&amp; offset &lt; FullWidth);      int i;     var accumulatedWidth = 0;      for (i = 0; ; i++)     {         Debug.Assert(i &lt; SlotCount);         var child = GetSlot(i);         if (child != null)         {             accumulatedWidth += child.FullWidth;             if (offset &lt; accumulatedWidth)             {                 break;             }         }     }      return i; }   public virtual int GetSlotOffset(int index) \/\/ O(i) {     var offset = 0;     for (var i = 0; i &lt; index; i++)     {         var child = GetSlot(i);          if (child != null)         {             offset += child.FullWidth;         }     }      return offset; }<\/code><\/pre>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (<code>GreenNode<\/code>)<\/p>\n<\/th>\n<th>\n<p align=\"left\"><code>WithLotsOfChildren<\/code><\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\"><code>GetSlotOffset(i)<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L185\" rel=\"noopener noreferrer nofollow\"><strong>O(i)<\/strong><\/a> &#8212; \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0448\u0438\u0440\u0438\u043d\u044b \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0437\u043b\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithLotsOfChildren.cs#L28\" rel=\"noopener noreferrer nofollow\"><strong>O(1)<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\"><code>FindSlotIndexContainingOffset(pos)<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L222\" rel=\"noopener noreferrer nofollow\"><strong>O(N)<\/strong><\/a> &#8212; \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/InternalSyntax\/SyntaxList.WithLotsOfChildren.cs#L42\" rel=\"noopener noreferrer nofollow\"><strong>O(log N)<\/strong><\/a> &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f <strong>\u043e\u0434\u0438\u043d \u0440\u0430\u0437<\/strong> \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u041d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 (<code>argument list<\/code>, <code>where<\/code>-\u043a\u043b\u0430\u0443\u0437 \u0438 \u0442. \u0434.) \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/509\/0e4\/9ca\/5090e49ca7b345e51e077f8cc79f6e39.png\" alt=\"\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f GreenSyntaxList\" title=\"\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f GreenSyntaxList\" width=\"2212\" height=\"1248\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/509\/0e4\/9ca\/5090e49ca7b345e51e077f8cc79f6e39.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/509\/0e4\/9ca\/5090e49ca7b345e51e077f8cc79f6e39.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f GreenSyntaxList<\/figcaption><\/div>\n<\/figure>\n<p><em>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u0451\u043c \u0432 <\/em><code><em>WithManyChildren<\/em><\/code><em>?<\/em><br \/>\u0414\u043b\u044f 4\u20139 \u0443\u0437\u043b\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <code>int[n]<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0431\u044b 24\u201340 \u0431\u0430\u0439\u0442, \u0430 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f. Roslyn \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0451\u043b <strong>GC-\u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u0438\u0435<\/strong> \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u0438\u043f\u0435\u0440-\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043c, \u0433\u0434\u0435 \u043e\u043d\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>Roslyn \u0434\u0435\u043b\u0438\u0442 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b<\/strong> &#8212; \u043a\u0440\u043e\u0448\u0435\u0447\u043d\u044b\u0435, \u043a\u044d\u0448\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u00ab\u043a\u0438\u0440\u043f\u0438\u0447\u0438\u00bb AST.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b<\/strong> &#8212; \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0431\u0451\u0440\u0442\u043a\u0438: \u0434\u0430\u044e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 API IDE; \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043b\u0435\u043d\u0438\u0432\u043e, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0438 \u043d\u0435 \u0442\u044f\u043d\u0443\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0430\u0432\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u0442\u043e\u0432\u0430\u044f \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0438 \u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u0434\u0435\u0440\u0436\u0430\u0442 \u0432\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0430\u0440\u043a \u0441\u0432\u0435\u0440\u0445\u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0441\u043c\u0435\u0441\u044c \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0438 IDE \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0434\u0430\u0436\u0435 \u0432 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/915166\/\"> https:\/\/habr.com\/ru\/articles\/915166\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u044f \u043d\u0430\u0447\u0430\u043b \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Roslyn, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0440\u0430\u0441\u043d\u043e-\u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. \u041d\u0438\u0436\u0435 &#8212; \u043c\u043e\u044f \u0432\u044b\u0436\u0438\u043c\u043a\u0430, \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0442\u043e\u0433\u0434\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/archive\/blogs\/ericlippert\/persistence-facades-and-roslyns-red-green-trees\" rel=\"noopener noreferrer nofollow\"><strong>Persistence, Facades and Roslyn&#8217;s Red-Green Trees<\/strong><\/a> , \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e, \u043d\u043e \u0451\u043c\u043a\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0435\u0451 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0443\u0448\u0451\u043b \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Roslyn. <\/p>\n<h2>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u043e\u0441\u043b\u0438\u043d\u0430<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0435-\u0447\u0442\u043e \u0443\u044f\u0441\u043d\u0438\u043c, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Roslyn \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u043e\u043d\u0430 \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u044f\u0437\u044b\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0430\u044f \u043d\u043e\u0434\u0430 SyntaxNode, \u0435\u0441\u043b\u0438 \u0431\u044b Roslyn \u0431\u044b\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f C#, \u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 RawKind, CreateSeparator \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 SyntaxNode<\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxTree<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430; \u0434\u0430\u0451\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 <code>CompilationUnitSyntax<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxNode<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u043e\u0434\u0430 (statement, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f\u2026).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxToken<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u043e\u0434\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c (<code>if<\/code>, <code>{<\/code>, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxTrivia<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043f\u0440\u043e\u0431\u0435\u043b\u044b, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, <code>#region<\/code> &#8212; \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SyntaxList&lt;T&gt;<\/code> \/ <code>SeparatedSyntaxList&lt;T&gt;<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434, \u0447\u0430\u0441\u0442\u043e \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043d\u0438 \u043a C#, \u043d\u0438 \u043a VB.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u043d\u043e\u0434\u0430<\/h2>\n<p>\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0430\u044f, \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435, \u043f\u043e \u0441\u0443\u0442\u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u044d\u0442\u043e SyntaxTree + \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c + \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 + \u0417\u0435\u043b\u0435\u043d\u0430\u044f \u043d\u043e\u0434\u0430<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 SyntaxNode(\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u043d\u043e\u0434\u044b)<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043d\u043e\u0434\u0435, \u043d\u0435 \u0432 \u043a\u0440\u0430\u0441\u043d\u043e\u0439, \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043b\u0438\u0448\u044c &#171;\u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u043d\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0443&#187;, \u0438 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0435\u043c \u0437\u0435\u043b\u0451\u043d\u0430\u044f.<\/p>\n<p>\u041a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b (\u043a\u0430\u043a \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0435) \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b, \u043d\u043e \u0438\u0445 \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c &#8212; \u043d\u0435 \u0434\u043b\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432: \u043b\u044e\u0431\u043e\u0439 <code>SyntaxNode<\/code> \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. <\/p>\n<p>\u0414\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u043d\u0435 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u0436\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c &#8212; \u0432\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e. <\/p>\n<p>\u041b\u044e\u0431\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u00ab\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0449\u0438\u0439\u00bb \u043a\u0440\u0430\u0441\u043d\u0443\u044e \u043d\u043e\u0434\u0443, \u043d\u0430 \u0434\u0435\u043b\u0435 \u00ad\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438; \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">var left  = SyntaxFactory.IdentifierName(\"a\"); var right = SyntaxFactory.IdentifierName(\"b\"); var sum   = SyntaxFactory.BinaryExpression(     SyntaxKind.AddExpression,     left,     SyntaxFactory.Token(SyntaxKind.PlusToken),     right);<\/code><\/pre>\n<p><code>left != sum.Left<\/code> &#8212; \u044d\u0442\u043e <em>\u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u0430: \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438, \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0438 \u0434\u0430\u0436\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. <\/p>\n<h2>SyntaxToken \u0438 SyntaxTrivia<\/h2>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u043e\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043d\u043e\u0434\u0430\u043c, \u043d\u043e \u0441 \u043d\u044e\u0430\u043d\u0441\u043e\u043c: \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043c\u043e\u0436\u0435\u0442 \u0438 <em>\u043d\u0435<\/em> \u0437\u043d\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0451\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, <code>SyntaxToken<\/code> \u0431\u044b\u0432\u0430\u0435\u0442 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>\u0415\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0441 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0434\u0435\u0440\u0435\u0432\u043e\u043c:<\/strong><br \/>\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 + \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f + \u0438\u043d\u0434\u0435\u043a\u0441 (\u043e \u043d\u0451\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435) + \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0442 \u0441\u0432\u044f\u0437\u0438:<\/strong><br \/>\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><code>SyntaxTrivia<\/code> \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0430\u043a:<\/p>\n<p><code>SyntaxToken<\/code> + \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u043d\u043e\u0434\u0430 + \u043f\u043e\u0437\u0438\u0446\u0438\u044f + \u0438\u043d\u0434\u0435\u043a\u0441 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e\u0431 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 &#8212; \u043f\u043e\u0437\u0436\u0435).<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b? \u041b\u044e\u0431\u0430\u044f \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u043e; \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u0443\u0437\u0435\u043b \u0447\u0435\u0440\u0435\u0437 <code>SyntaxFactory.BinaryExpression<\/code>, \u0443 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e. \u0417\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 &#8212; \u0430\u0431\u0441\u0443\u0440\u0434, \u0441 <code>SyntaxTrivia<\/code> \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430.<\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u0434\u0438, \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0435\u043d\u0438\u0432\u043e: \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438, \u043f\u043e\u0438\u0441\u043a \u0438\u0434\u0451\u0442 \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u043d\u043e\u0434\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0435\u0440\u0435\u0432\u043e \u0443\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e; \u0435\u0441\u043b\u0438 \u0438 \u0442\u0430\u043c \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f &#8212; \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e.<\/p>\n<h2>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b<\/h2>\n<p>\u0412\u0441\u044f \u043c\u0430\u0433\u0438\u044f \u0442\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c: \u043f\u043e \u0441\u0443\u0442\u0438, \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043d\u043e\u0434\u044b &#8212; \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u00ab\u043e\u0431\u0451\u0440\u0442\u043a\u0430\u00bb \u0432\u043e\u043a\u0440\u0443\u0433 \u0437\u0435\u043b\u0451\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0438 \u043a\u0440\u0430\u0441\u043d\u043e\u0439.<\/p>\n<p>\u0427\u0442\u043e \u0435\u0441\u0442\u044c \u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b? \u041d\u0443\u2026 \u043f\u0440\u043e\u0449\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0435\u0433\u043e \u0443 \u043d\u0435\u0451 <strong>\u043d\u0435\u0442<\/strong>.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0417\u0435\u043b\u0435\u043d\u0430\u044f \u043d\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b (\u043a\u0430\u043a \u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435) \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0445, \u043f\u043e \u0437\u0435\u043b\u0451\u043d\u044b\u043c \u043d\u043e\u0434\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e <strong>\u0432\u043d\u0438\u0437<\/strong>: \u043e\u043d\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e \u0441\u0432\u043e\u0438\u0445 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f\u0445. \u0423 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434 \u043d\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 &#8212; \u0442\u043e\u043b\u044c\u043a\u043e <strong>\u0448\u0438\u0440\u0438\u043d\u0430<\/strong> (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>if<\/code> &#8212; \u0434\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430).<\/p>\n<p> \u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u0421 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e (\u2248 95 %) \u0432\u0441\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 (<code>for<\/code>, <code>if<\/code>, <code>var<\/code>, <code>int<\/code>, <code>async<\/code>, <code>await<\/code> \u0438 \u0442. \u0434.) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u043e\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <code><strong>TokenWithWellKnownText<\/strong><\/code> (\u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0447\u0435\u0439 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d &#8212; \u043a\u0430\u0432\u044b\u0447\u043a\u0438, \u0437\u043d\u0430\u043a\u0438 \u00ab+\u00bb, \u00ab-\u00bb, \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430) \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f <strong>\u043f\u044f\u0442\u044c<\/strong> \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>5 \u0432\u0438\u0434\u043e\u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0412\u0430\u0440\u0438\u0430\u043d\u0442<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043e\u043b\u0435 \u043a\u0435\u0448\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0411\u0435\u0437 trivia<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L144\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithNoTrivia<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0434\u0438\u043d \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if_<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L146\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithSingleTrailingSpace<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u00ab\u042d\u043b\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f\u00bb trivia<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if{elastic}<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L145C61-L145C87\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithElasticTrivia<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0441\u043b\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>if\u23ce<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L147C61-L147C92\" rel=\"noopener noreferrer nofollow\"><strong>s_tokensWithSingleTrailingCRLF<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u00abMissing\u00bb-\u0442\u043e\u043a\u0435\u043d<\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439<\/em> <code>;<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/917401d2427506f537b613c13a7f91f18e5733fe\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxToken.cs#L148\" rel=\"noopener noreferrer nofollow\"><strong>s_missingTokensWithNoTrivia<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<blockquote>\n<p><strong>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 elastic trivia<\/strong><\/p>\n<p>\u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u00ab\u0440\u0435\u0437\u0438\u043d\u043e\u0432\u0430\u044f\u00bb \u0432\u0441\u0442\u0430\u0432\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a IDE \u043c\u043e\u0436\u0435\u0442 <strong>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c<\/strong> \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c\/\u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u043a\u043e\u0434\u0430: \u043c\u043e\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c AST \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Roslyn.<\/p>\n<\/blockquote>\n<p>\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>if<\/code><\/p>\n<pre><code class=\"cs\">if (...)<\/code><\/pre>\n<p>\u043f\u0430\u0440\u0441\u0435\u0440 \u0432\u043e\u0437\u044c\u043c\u0451\u0442 \u0443\u0436\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u0434\u043b\u044f <code>if<\/code> (\u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0441 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c \u043f\u043e\u0441\u043b\u0435). \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">if \/\/ \u0431\u0435\u0433\u0438\u0442\u0435 \u044f \u0447\u043e\u043a\u043d\u0443\u0442\u043d\u044b\u0439 (...) \/\/ \u0438\u043b\u0438 \u0442\u0430\u043a for \/* \u0441\u0430\u043d\u044f \u0442\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 ? *\/ (...)<\/code><\/pre>\n<p>\u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 <strong>\u043d\u043e\u0432\u044b\u0439<\/strong> \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e.<\/p>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u0433\u0434\u0435 \u043f\u0440\u0438 <strong>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438<\/strong> \u0434\u0430\u0436\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0434\u0435\u0440\u0435\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0441 \u0437\u0435\u043b\u0451\u043d\u044b\u043c \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043c\u044f\u0433\u0447\u0435: \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u0435\u043b\u0451\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u043e \u043e\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 99 % \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>\u0417\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0435. \u0423 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434<br \/><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/GreenNode.cs#L961C38-L961C47\" rel=\"noopener noreferrer nofollow\"><strong>abstract RedNode CreateRed(RedNode? parent, int position)<\/strong><\/a><br \/>(<code>RedNode<\/code> &#8212; \u044d\u0442\u043e <code>SyntaxNode<\/code>; \u044f \u043f\u0438\u0448\u0443 \u0442\u0430\u043a \u0434\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438).<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0440\u0430\u0431\u043e\u0442\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0423 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u043d\u043e\u0434 \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430 &#8212; <code><strong>GreenSyntaxFactory<\/strong><\/code><br \/>(\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043e\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/a656d1adeb3c751c7acefba23e4c98729e1efb99\/src\/Compilers\/CSharp\/Portable\/Syntax\/InternalSyntax\/SyntaxFactory.cs\" rel=\"noopener noreferrer nofollow\"><strong>SyntaxFactory<\/strong><\/a>). \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u0443\u0436\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0451.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 &#8212; \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u0443\u044e \u0438 <strong>\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f<\/strong> \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0424\u0430\u0431\u0440\u0438\u043a\u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u043d\u043e\u0434 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (<code>SyntaxNode<\/code>, <code>SyntaxToken<\/code>, <code>SyntaxTrivia<\/code>) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0435\u043b\u0451\u043d\u044b\u0435 \u043d\u043e\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0437\u0435\u043b\u0451\u043d\u0443\u044e \u043d\u043e\u0434\u0443 \u0432 \u043a\u0440\u0430\u0441\u043d\u0443\u044e.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0437\u0435\u043b\u0451\u043d\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430 <strong>\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442<\/strong> \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u043a\u043e\u0434\u0443. \u042d\u0442\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432\u0441\u0435\u0439 \u00ab\u0437\u0435\u043b\u0451\u043d\u043e\u0439\u00bb \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b &#8212; \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Roslyn \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c <code>throw<\/code>: \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0438 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 Public API, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e. \u0412 production-\u0432\u0435\u0440\u0441\u0438\u0438 Roslyn \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u00ab\u043a\u0440\u0430\u0441\u043d\u0430\u044f\u00bb \u0441\u0442\u043e\u0440\u043e\u043d\u0430.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f: BinaryExpressionSyntax<\/h4>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 <strong>\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c<\/strong> \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443, \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043d\u043e\u0434\u0430 &#8212; \u044d\u0442\u043e \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u0437\u0435\u043b\u0451\u043d\u043e\u0439. \u041d\u0438\u0436\u0435 &#8212; \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u044b\u0439 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">public sealed partial class BinaryExpressionSyntax : ExpressionSyntax {     \/\/ \u041b\u0435\u043d\u0438\u0432\u044b\u0435 (!) \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0443\u0437\u043b\u044b     internal ExpressionSyntax? _left;     internal ExpressionSyntax? _right;      internal BinaryExpressionSyntax(GreenBinaryExpressionSyntax green,                                     RedNode? parent,                                     int position)         : base(green, parent, position) { }      internal BinaryExpressionSyntax(GreenBinaryExpressionSyntax green,                                     int position,                                     SyntaxTree syntaxTree)         : base(green, position, syntaxTree) { }      \/\/ \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u00ab\u043a\u0430\u0441\u0442\u00bb \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b     internal new GreenBinaryExpressionSyntax Green =&gt;         System.Runtime.CompilerServices.Unsafe.As&lt;GreenBinaryExpressionSyntax&gt;(base.Green);      \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f     public ExpressionSyntax Left  =&gt; GetRed(ref _left, 0)!;      \/\/ OperatorToken \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u2015 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 SyntaxToken     public SyntaxToken OperatorToken =&gt;         new(Parent, Green.OperatorToken, GetChildPosition(1), GetChildIndex(1));      \/\/ \u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f     public ExpressionSyntax Right =&gt; GetRed(ref _right, 2)!;      \/\/ \u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u0443\u0437\u043b\u0430\u043c     public override RedNode? GetNodeSlot(int index) =&gt;         index switch         {             0 =&gt; GetRed(ref _left, 0)!,             \/\/ \u042d\u043b\u0435\u043c\u0435\u043d\u0442 c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c 1 \u2015 \u044d\u0442\u043e `OperatorToken`             2 =&gt; GetRed(ref _right, 2)!,             _ =&gt; null         }; }  internal sealed partial class GreenBinaryExpressionSyntax : GreenExpressionSyntax {     \/\/ \u0418\u0441\u0442\u0438\u043d\u043d\u044b\u0435 \u00ab\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0438\u00bb \u0434\u0430\u043d\u043d\u044b\u0445     public readonly GreenExpressionSyntax Left;     public readonly GreenSyntaxToken      OperatorToken;     public readonly GreenExpressionSyntax Right;      public GreenBinaryExpressionSyntax(GreenExpressionSyntax left,                                        GreenSyntaxToken operatorToken,                                        GreenExpressionSyntax right,                                        DiagnosticInfo[]? diagnostics = null,                                        SyntaxAnnotation[]? annotations = null)         : base(SyntaxKind.None, diagnostics, annotations)     {         Left          = left;         OperatorToken = operatorToken;         Right         = right;     }      public override GreenNode? GetSlot(int index) =&gt;         index switch         {             0 =&gt; Left,             1 =&gt; OperatorToken,             2 =&gt; Right,             _ =&gt; null         };      public override RedNode CreateRed(RedNode? parent, int position) =&gt;         new BinaryExpressionSyntax(this, parent, position); } <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, <strong>\u0437\u0435\u043b\u0451\u043d\u0430\u044f<\/strong> \u043d\u043e\u0434\u0430 \u2015 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445; <strong>\u043a\u0440\u0430\u0441\u043d\u0430\u044f<\/strong> \u043b\u0438\u0448\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u043d\u0430\u0440\u0443\u0436\u0443. <\/p>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/SyntaxNode.cs#L172\" rel=\"noopener noreferrer nofollow\"><strong>GetRed <\/strong><\/a><\/p>\n<pre><code class=\"cs\">protected T? GetRed&lt;T&gt;(ref T? field, int slot) where T : RedNode {     var result = field;      if (result == null)     {         var green = this.Green.GetSlot(slot);         if (green != null)         {             Interlocked.CompareExchange(                 ref field,                 (T)green.CreateRed(this, GetChildPosition(slot)),                 comparand: null);              result = field;         }     }      return result; }<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/6badbad723cb9371e0daa044793f15c6437e887b\/src\/Compilers\/Core\/Portable\/Syntax\/SyntaxNode.cs#L172\" rel=\"noopener noreferrer nofollow\"><strong>GetRed <\/strong><\/a>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <strong>\u043b\u0435\u043d\u0438\u0432\u043e\u0435<\/strong> \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0437\u0435\u043b\u0451\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u043a\u0440\u0430\u0441\u043d\u0443\u044e:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u0435\u0448.<\/strong> \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-462421","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/462421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=462421"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/462421\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=462421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=462421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=462421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}